Skip to content

Conversation

@zhangstar333
Copy link
Contributor

@zhangstar333 zhangstar333 commented Nov 7, 2025

What problem does this PR solve?

Problem Summary:
support varbinary type in hive/iceberg/paimon table, could mapping varbinary type into doris directly, not of use string type, could use catalog properties enable.mapping.varbinary control it, and default is false.
and TVF function, eg HDFS also have param could control, and default is false.

  1. when parquet file column type is tparquet::Type::BYTE_ARRAY and no logicalType and converted_type,read it to column_varbianry directly. so both physical convert and logical convert are consistent.

    if tparquet::Type::BYTE_ARRAY and have set logicalType, eg String, so those will be reading as column_string, and if the table column create as binary column, so VarBinaryConverter used convert column_string to column_varbinary.

  2. when orc file column is binary type, also mapping to varbinary type directly, and could reuse StringVectorBatch.

  3. add cast between string and varbinary type.

  4. mapping UUID to binary type instead of string in iceberg .

  5. change the bool safe_cast_string(const char* startptr, size_t buffer_size, xxx) signature to safe_cast_string(const StringRef& str_ref, xxx).

  6. add const to read_date_text_impl function.

  7. add some test with paimon catalog test varbinary, will add more case for hive/iceberg and update doc.

mysql> show create table binary_demo3;
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table        | Create Table                                                                                                                                                                                                                                                                                                                                                                                     |
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| binary_demo3 | CREATE TABLE `binary_demo3` (
  `id` int NULL,
  `record_name` char(10) NULL,
  `vrecord_name` text NULL,
  `bin` varbinary(10) NULL,
  `varbin` varbinary(2147483647) NULL
) ENGINE=PAIMON_EXTERNAL_TABLE
LOCATION 'file:/mnt/disk2/zhangsida/test_paimon/demo.db/binary_demo3'
PROPERTIES (
  "path" = "file:/mnt/disk2/zhangsida/test_paimon/demo.db/binary_demo3",
  "primary-key" = "id"
); |
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> select *, length(record_name),length(vrecord_name),length(bin),length(varbin) from binary_demo3;
+------+-------------+--------------+------------------------+----------------+---------------------+----------------------+-------------+----------------+
| id   | record_name | vrecord_name | bin                    | varbin         | length(record_name) | length(vrecord_name) | length(bin) | length(varbin) |
+------+-------------+--------------+------------------------+----------------+---------------------+----------------------+-------------+----------------+
|    1 | AAAA        | AAAA         | 0xAAAA0000000000000000 | 0xAAAA         |                  10 |                    4 |          10 |              2 |
|    2 | 6161        | 6161         | 0x61610000000000000000 | 0x6161         |                  10 |                    4 |          10 |              2 |
|    3 | NULL        | NULL         | NULL                   | NULL           |                NULL |                 NULL |        NULL |           NULL |
+------+-------------+--------------+------------------------+----------------+---------------------+----------------------+-------------+----------------+

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@zhangstar333

This comment was marked as duplicate.

@zhangstar333 zhangstar333 changed the title update [feature](catalog) support varbinary type mapping in paimon table Nov 10, 2025
@zhangstar333 zhangstar333 changed the title [feature](catalog) support varbinary type mapping in paimon table [feature](catalog) support varbinary type mapping in hive/ireberg/paimon table Nov 14, 2025
@morningman morningman changed the title [feature](catalog) support varbinary type mapping in hive/ireberg/paimon table [feature](catalog) support varbinary type mapping in hive/iceberg/paimon table Nov 14, 2025
@zhangstar333 zhangstar333 force-pushed the file_scan branch 3 times, most recently from 2ada766 to 94c865d Compare November 18, 2025 10:27
@zhangstar333
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 80.61% (1700/2109)
Line Coverage 66.67% (29773/44660)
Region Coverage 67.26% (14866/22101)
Branch Coverage 57.50% (7906/13750)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 11.63% (10/86) 🎉
Increment coverage report
Complete coverage report

@doris-robot
Copy link

TPC-H: Total hot run time: 34948 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 94c865dff9c2313c7cfced9864c0df74f00108ef, data reload: false

------ Round 1 ----------------------------------
q1	17621	5058	4968	4968
q2	1979	310	207	207
q3	10294	1307	728	728
q4	10237	968	380	380
q5	7574	2448	2360	2360
q6	183	168	137	137
q7	930	781	631	631
q8	9368	1360	1120	1120
q9	6986	5190	5138	5138
q10	6830	2224	1808	1808
q11	501	320	274	274
q12	334	363	233	233
q13	17779	3666	3015	3015
q14	248	236	216	216
q15	597	512	501	501
q16	1043	990	947	947
q17	592	877	382	382
q18	7574	7659	7984	7659
q19	1134	977	552	552
q20	404	363	228	228
q21	4356	3409	2421	2421
q22	1130	1087	1043	1043
Total cold run time: 107694 ms
Total hot run time: 34948 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5270	5245	5149	5149
q2	251	335	229	229
q3	2344	2861	2530	2530
q4	1471	1912	1386	1386
q5	4556	4451	4508	4451
q6	207	161	121	121
q7	2054	1949	1809	1809
q8	2680	2618	2585	2585
q9	7308	7488	7253	7253
q10	3076	3268	2806	2806
q11	585	517	514	514
q12	622	728	600	600
q13	3259	3642	3033	3033
q14	264	278	263	263
q15	526	491	488	488
q16	1000	1059	1004	1004
q17	1126	1493	1317	1317
q18	7264	7195	6941	6941
q19	767	840	993	840
q20	1926	1964	1805	1805
q21	4665	4305	4360	4305
q22	1078	1043	1021	1021
Total cold run time: 52299 ms
Total hot run time: 50450 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 188642 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 94c865dff9c2313c7cfced9864c0df74f00108ef, data reload: false

query1	1024	421	398	398
query2	6558	1667	1731	1667
query3	6756	237	233	233
query4	26071	23385	22729	22729
query5	4849	673	546	546
query6	360	258	254	254
query7	4659	509	310	310
query8	313	273	274	273
query9	8733	2965	2925	2925
query10	524	362	322	322
query11	15525	15089	14870	14870
query12	180	129	124	124
query13	1691	584	451	451
query14	11135	9305	9106	9106
query15	199	190	169	169
query16	7690	671	507	507
query17	1415	756	625	625
query18	2034	419	320	320
query19	217	200	178	178
query20	135	124	122	122
query21	215	135	115	115
query22	3952	4188	3981	3981
query23	34273	33003	32981	32981
query24	8160	2446	2361	2361
query25	626	523	463	463
query26	1237	276	168	168
query27	2731	510	363	363
query28	4410	2234	2200	2200
query29	789	633	507	507
query30	301	226	200	200
query31	911	802	737	737
query32	125	86	83	83
query33	627	391	351	351
query34	785	847	520	520
query35	813	836	743	743
query36	952	994	891	891
query37	129	115	96	96
query38	3542	3567	3484	3484
query39	1475	1424	1402	1402
query40	244	135	125	125
query41	62	59	59	59
query42	140	121	115	115
query43	466	495	462	462
query44	1252	819	788	788
query45	187	188	172	172
query46	888	998	643	643
query47	1749	1825	1735	1735
query48	389	429	330	330
query49	762	523	419	419
query50	670	680	408	408
query51	3851	3913	3915	3913
query52	112	116	108	108
query53	244	285	203	203
query54	358	311	299	299
query55	94	98	91	91
query56	368	340	354	340
query57	1194	1187	1113	1113
query58	304	294	292	292
query59	2544	2624	2569	2569
query60	366	368	347	347
query61	169	159	164	159
query62	793	702	646	646
query63	225	198	198	198
query64	4432	1183	880	880
query65	4027	3989	3922	3922
query66	1124	450	358	358
query67	15242	14952	15027	14952
query68	4699	967	645	645
query69	502	366	313	313
query70	1351	1270	1291	1270
query71	437	350	337	337
query72	5899	5208	5087	5087
query73	658	590	374	374
query74	8907	9064	9121	9064
query75	3329	3249	2807	2807
query76	3303	1136	741	741
query77	497	412	364	364
query78	9553	9626	8965	8965
query79	2692	800	599	599
query80	1663	590	554	554
query81	564	261	234	234
query82	406	164	137	137
query83	297	257	252	252
query84	257	119	96	96
query85	921	495	449	449
query86	475	317	299	299
query87	3645	3714	3679	3679
query88	3228	2274	2265	2265
query89	386	328	296	296
query90	1932	235	232	232
query91	164	163	139	139
query92	91	80	76	76
query93	2747	1000	665	665
query94	779	425	341	341
query95	419	336	341	336
query96	490	577	284	284
query97	2896	2949	2857	2857
query98	258	223	216	216
query99	1307	1408	1248	1248
Total cold run time: 273129 ms
Total hot run time: 188642 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 28.57 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 94c865dff9c2313c7cfced9864c0df74f00108ef, data reload: false

query1	0.05	0.05	0.06
query2	0.13	0.07	0.07
query3	0.33	0.07	0.07
query4	1.60	0.09	0.09
query5	0.26	0.24	0.25
query6	1.18	0.65	0.65
query7	0.03	0.02	0.03
query8	0.08	0.06	0.07
query9	0.64	0.53	0.52
query10	0.59	0.58	0.60
query11	0.27	0.14	0.14
query12	0.26	0.14	0.14
query13	0.65	0.63	0.63
query14	1.03	1.04	1.02
query15	0.97	0.86	0.88
query16	0.39	0.39	0.39
query17	1.08	1.06	1.06
query18	0.23	0.22	0.22
query19	1.99	1.85	1.88
query20	0.02	0.01	0.02
query21	15.40	0.30	0.25
query22	4.97	0.10	0.10
query23	15.38	0.39	0.23
query24	2.79	0.54	0.34
query25	0.11	0.09	0.10
query26	0.19	0.17	0.17
query27	0.10	0.09	0.09
query28	3.55	1.28	1.06
query29	12.57	4.02	3.34
query30	0.35	0.13	0.10
query31	2.80	0.63	0.44
query32	3.24	0.62	0.51
query33	3.09	3.07	3.14
query34	16.35	5.19	4.52
query35	4.55	4.56	4.58
query36	0.63	0.52	0.51
query37	0.23	0.09	0.10
query38	0.19	0.06	0.06
query39	0.06	0.05	0.04
query40	0.20	0.19	0.17
query41	0.11	0.06	0.06
query42	0.07	0.05	0.05
query43	0.07	0.05	0.06
Total cold run time: 98.78 s
Total hot run time: 28.57 s

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 66.32% (189/285) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.75% (18286/34665)
Line Coverage 38.12% (166186/435947)
Region Coverage 33.04% (129220/391058)
Branch Coverage 33.84% (55466/163930)

@apache apache deleted a comment from doris-robot Nov 18, 2025
@apache apache deleted a comment from doris-robot Nov 18, 2025
@apache apache deleted a comment from doris-robot Nov 18, 2025
@apache apache deleted a comment from hello-stephen Nov 18, 2025
@apache apache deleted a comment from hello-stephen Nov 18, 2025
@apache apache deleted a comment from hello-stephen Nov 18, 2025
@apache apache deleted a comment from hello-stephen Nov 18, 2025
@apache apache deleted a comment from doris-robot Nov 18, 2025
@apache apache deleted a comment from doris-robot Nov 18, 2025
@apache apache deleted a comment from doris-robot Nov 18, 2025
@apache apache deleted a comment from doris-robot Nov 18, 2025
@apache apache deleted a comment from doris-robot Nov 18, 2025
@apache apache deleted a comment from doris-robot Nov 18, 2025
@apache apache deleted a comment from doris-robot Nov 18, 2025
@apache apache deleted a comment from hello-stephen Nov 18, 2025
@apache apache deleted a comment from hello-stephen Nov 18, 2025
@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 80.86% (1707/2111)
Line Coverage 66.85% (29888/44708)
Region Coverage 67.39% (14902/22114)
Branch Coverage 57.60% (7930/13768)

@doris-robot
Copy link

TPC-H: Total hot run time: 34556 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 5598c24e5eac276d76d6e5ad1999096d488e0dd0, data reload: false

------ Round 1 ----------------------------------
q1	17439	5103	4944	4944
q2	2024	339	217	217
q3	10104	1285	755	755
q4	10229	969	373	373
q5	7570	2426	2413	2413
q6	186	169	139	139
q7	968	806	659	659
q8	9384	1351	1091	1091
q9	7308	5509	5358	5358
q10	6868	2246	1811	1811
q11	534	315	279	279
q12	335	381	229	229
q13	17795	3680	3030	3030
q14	244	257	217	217
q15	597	525	511	511
q16	1039	1012	968	968
q17	616	877	370	370
q18	7664	7152	7189	7152
q19	1146	943	549	549
q20	374	349	225	225
q21	3728	3180	2314	2314
q22	1025	1015	952	952
Total cold run time: 107177 ms
Total hot run time: 34556 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4987	4946	4922	4922
q2	362	397	311	311
q3	2196	2701	2296	2296
q4	1348	1781	1349	1349
q5	4265	4560	4604	4560
q6	217	184	133	133
q7	2058	1924	1838	1838
q8	2719	2605	2563	2563
q9	7472	7456	7500	7456
q10	3135	3303	2811	2811
q11	583	512	498	498
q12	710	796	636	636
q13	3481	3867	3379	3379
q14	289	310	307	307
q15	551	508	515	508
q16	1107	1147	1132	1132
q17	1180	1539	1400	1400
q18	8035	7495	7650	7495
q19	804	817	861	817
q20	2052	2073	2066	2066
q21	4921	4382	4369	4369
q22	1089	1007	999	999
Total cold run time: 53561 ms
Total hot run time: 51845 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 183655 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 5598c24e5eac276d76d6e5ad1999096d488e0dd0, data reload: false

query1	1094	425	399	399
query2	6575	1596	1572	1572
query3	6756	225	220	220
query4	24877	22870	22548	22548
query5	4408	641	470	470
query6	324	246	215	215
query7	4640	500	296	296
query8	308	256	240	240
query9	8734	2564	2566	2564
query10	507	354	302	302
query11	15607	14743	14698	14698
query12	175	114	113	113
query13	1669	587	448	448
query14	10719	8795	8750	8750
query15	208	197	180	180
query16	7377	720	546	546
query17	1223	755	625	625
query18	2022	421	326	326
query19	208	204	184	184
query20	132	128	122	122
query21	215	142	116	116
query22	4060	3929	3878	3878
query23	32841	32239	32116	32116
query24	8372	2429	2355	2355
query25	579	507	447	447
query26	1234	295	162	162
query27	2737	505	356	356
query28	4372	2148	2116	2116
query29	784	637	489	489
query30	314	259	211	211
query31	869	726	624	624
query32	86	73	68	68
query33	629	387	334	334
query34	772	852	510	510
query35	823	853	741	741
query36	924	965	845	845
query37	122	107	83	83
query38	3295	3335	3286	3286
query39	1511	1423	1400	1400
query40	228	129	125	125
query41	83	79	75	75
query42	127	116	110	110
query43	468	478	449	449
query44	1239	761	747	747
query45	199	194	179	179
query46	884	999	639	639
query47	1734	1741	1679	1679
query48	394	422	319	319
query49	760	486	407	407
query50	640	681	403	403
query51	3925	3842	3986	3842
query52	111	110	103	103
query53	242	261	197	197
query54	305	294	284	284
query55	89	84	86	84
query56	322	328	321	321
query57	1148	1196	1094	1094
query58	282	276	276	276
query59	2375	2515	2321	2321
query60	346	350	329	329
query61	162	159	166	159
query62	785	715	675	675
query63	238	188	202	188
query64	4444	1287	902	902
query65	4058	3986	3967	3967
query66	1159	432	335	335
query67	15138	14978	14784	14784
query68	4629	918	632	632
query69	513	338	303	303
query70	1282	1211	1204	1204
query71	411	343	303	303
query72	6048	4808	4839	4808
query73	656	586	366	366
query74	8466	8763	8361	8361
query75	3294	3285	2818	2818
query76	3289	1131	709	709
query77	518	416	315	315
query78	9324	9668	8986	8986
query79	1037	814	607	607
query80	1234	572	497	497
query81	554	270	247	247
query82	403	163	137	137
query83	354	259	245	245
query84	261	122	99	99
query85	934	487	441	441
query86	385	310	284	284
query87	3476	3504	3366	3366
query88	2815	2279	2254	2254
query89	378	329	287	287
query90	1748	220	220	220
query91	179	169	141	141
query92	66	71	60	60
query93	1173	998	663	663
query94	724	427	336	336
query95	501	398	397	397
query96	491	576	276	276
query97	2899	2958	2836	2836
query98	225	212	206	206
query99	1331	1386	1303	1303
Total cold run time: 263585 ms
Total hot run time: 183655 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 28.39 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 5598c24e5eac276d76d6e5ad1999096d488e0dd0, data reload: false

query1	0.05	0.05	0.05
query2	0.12	0.06	0.06
query3	0.30	0.07	0.08
query4	1.61	0.09	0.08
query5	0.26	0.26	0.25
query6	1.17	0.64	0.64
query7	0.03	0.03	0.03
query8	0.07	0.06	0.06
query9	0.67	0.55	0.53
query10	0.60	0.59	0.59
query11	0.25	0.13	0.14
query12	0.26	0.14	0.15
query13	0.65	0.62	0.62
query14	1.04	1.02	1.01
query15	0.94	0.85	0.84
query16	0.38	0.38	0.40
query17	1.00	1.06	1.04
query18	0.24	0.21	0.21
query19	1.97	1.80	1.82
query20	0.01	0.02	0.01
query21	15.39	0.28	0.24
query22	4.99	0.11	0.10
query23	15.36	0.39	0.22
query24	2.88	0.47	0.31
query25	0.10	0.09	0.09
query26	0.18	0.17	0.18
query27	0.10	0.09	0.09
query28	3.66	1.23	1.12
query29	12.58	3.98	3.30
query30	0.33	0.12	0.09
query31	2.81	0.63	0.46
query32	3.23	0.60	0.51
query33	3.03	3.14	3.10
query34	16.69	5.14	4.52
query35	4.60	4.53	4.53
query36	0.66	0.50	0.50
query37	0.22	0.09	0.08
query38	0.20	0.05	0.06
query39	0.06	0.06	0.05
query40	0.20	0.18	0.17
query41	0.11	0.06	0.06
query42	0.06	0.05	0.05
query43	0.06	0.05	0.04
Total cold run time: 99.12 s
Total hot run time: 28.39 s

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 79.32% (211/266) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.85% (18412/34836)
Line Coverage 38.34% (168286/438892)
Region Coverage 33.16% (130734/394256)
Branch Coverage 34.08% (56235/165022)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 83.83% (223/266) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.62% (24491/34195)
Line Coverage 58.10% (255066/439034)
Region Coverage 53.34% (213117/399550)
Branch Coverage 54.77% (90930/166015)

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 83.72% (72/86) 🎉
Increment coverage report
Complete coverage report

@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Nov 26, 2025
@zhangstar333 zhangstar333 merged commit c1eaede into apache:master Nov 26, 2025
28 of 30 checks passed
zhangstar333 added a commit that referenced this pull request Nov 27, 2025
### What problem does this PR solve?
Problem Summary:
support varbinary type mapping in DB2,MYSQL,Oracle,PostgreSQL,SQLServer
JDBC catalog.
u can control this when create catalog with property
"enable.mapping.varbinary", default value is false.
if it's true, will mapping the binary type to doris varbinary type,
if it's false, will mapping the binary type to doris string type.

Followup #57821

### Release note
support mapping varbinary type in JBDC catalog
github-actions bot pushed a commit that referenced this pull request Nov 27, 2025
### What problem does this PR solve?
Problem Summary:
support varbinary type mapping in DB2,MYSQL,Oracle,PostgreSQL,SQLServer
JDBC catalog.
u can control this when create catalog with property
"enable.mapping.varbinary", default value is false.
if it's true, will mapping the binary type to doris varbinary type,
if it's false, will mapping the binary type to doris string type.

Followup #57821

### Release note
support mapping varbinary type in JBDC catalog
zhangstar333 added a commit to zhangstar333/incubator-doris that referenced this pull request Nov 28, 2025
…mon table (apache#57821)

Problem Summary:
support varbinary type in hive/iceberg/paimon table, could mapping
varbinary type into doris directly, not of use string type, could use
catalog properties enable.mapping.varbinary control it, and default is
false.
and TVF function, eg HDFS also have param could control, and default is
false.

1. when parquet file column type is tparquet::Type::BYTE_ARRAY and no
logicalType and converted_type,read it to column_varbianry directly. so
both physical convert and logical convert are consistent.

if tparquet::Type::BYTE_ARRAY and have set logicalType, eg String, so
those will be reading as column_string, and if the table column create
as binary column, so VarBinaryConverter used convert column_string to
column_varbinary.

2. when orc file column is binary type, also mapping to varbinary type
directly, and could reuse StringVectorBatch.

3. add cast between string and varbinary type.

4. mapping UUID to binary type instead of string  in iceberg .

5. change the bool safe_cast_string(**const char\* startptr, size_t
buffer_size**, xxx) signature to safe_cast_string(**const StringRef&
str_ref**, xxx).

6. add **const** to read_date_text_impl function.

7. add some test with paimon catalog test varbinary, will add more case
for hive/iceberg and update doc.
```
mysql> show create table binary_demo3;
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table        | Create Table                                                                                                                                                                                                                                                                                                                                                                                     |
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| binary_demo3 | CREATE TABLE `binary_demo3` (
  `id` int NULL,
  `record_name` char(10) NULL,
  `vrecord_name` text NULL,
  `bin` varbinary(10) NULL,
  `varbin` varbinary(2147483647) NULL
) ENGINE=PAIMON_EXTERNAL_TABLE
LOCATION 'file:/mnt/disk2/zhangsida/test_paimon/demo.db/binary_demo3'
PROPERTIES (
  "path" = "file:/mnt/disk2/zhangsida/test_paimon/demo.db/binary_demo3",
  "primary-key" = "id"
); |
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> select *, length(record_name),length(vrecord_name),length(bin),length(varbin) from binary_demo3;
+------+-------------+--------------+------------------------+----------------+---------------------+----------------------+-------------+----------------+
| id   | record_name | vrecord_name | bin                    | varbin         | length(record_name) | length(vrecord_name) | length(bin) | length(varbin) |
+------+-------------+--------------+------------------------+----------------+---------------------+----------------------+-------------+----------------+
|    1 | AAAA        | AAAA         | 0xAAAA0000000000000000 | 0xAAAA         |                  10 |                    4 |          10 |              2 |
|    2 | 6161        | 6161         | 0x61610000000000000000 | 0x6161         |                  10 |                    4 |          10 |              2 |
|    3 | NULL        | NULL         | NULL                   | NULL           |                NULL |                 NULL |        NULL |           NULL |
+------+-------------+--------------+------------------------+----------------+---------------------+----------------------+-------------+----------------+

```

support varbinary type mapping in hive/iceberg/paimon table
yiguolei pushed a commit that referenced this pull request Nov 28, 2025
…/iceberg/paimon table (#57821) (#58482)

### What problem does this PR solve?
Problem Summary:
cherry-pick from (#57821)

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] Regression test
    - [ ] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
        - [ ] Previous test can cover this change.
        - [ ] No code files have been changed.
        - [ ] Other reason <!-- Add your reason?  -->

- Behavior changed:
    - [ ] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
zhangstar333 added a commit that referenced this pull request Nov 28, 2025
### What problem does this PR solve?
Problem Summary:
support varbinary type mapping in DB2,MYSQL,Oracle,PostgreSQL,SQLServer
JDBC catalog.
u can control this when create catalog with property
"enable.mapping.varbinary", default value is false.
if it's true, will mapping the binary type to doris varbinary type,
if it's false, will mapping the binary type to doris string type.

Followup #57821

### Release note
support mapping varbinary type in JBDC catalog
morningman pushed a commit that referenced this pull request Dec 1, 2025
### What problem does this PR solve?

the introduced pr: #57821
github-actions bot pushed a commit that referenced this pull request Dec 1, 2025
### What problem does this PR solve?

the introduced pr: #57821
@yiguolei yiguolei mentioned this pull request Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/4.0.2-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants