Skip to content

[fix](fe) Preserve non-UTF-8 prepared statement parameters - #69805

Merged
CalvinKirs merged 3 commits into
apache:masterfrom
CalvinKirs:fix-mysql-binary-parameters
Nov 3, 2026
Merged

CalvinKirs merged 3 commits into
apache:masterfrom
CalvinKirs:fix-mysql-binary-parameters

Conversation

@CalvinKirs

@CalvinKirs CalvinKirs commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

What problem does this PR solve?

Related PR: #69314

JDBC setBytes() and Connector/ODBC binary bindings can send MYSQL_TYPE_VAR_STRING / MYSQL_TYPE_STRING rather than BLOB. FE decoded those bytes with Java's replacement UTF-8 decoder, silently changing arbitrary binary data. For example, 0080FF4100C328 became 00EFBFBDEFBFBD4100EFBFBD28 in SELECT HEX(?). The BLOB handling added by #69314 did not cover these wire types.

Decode string parameters strictly and retain non-UTF-8 payloads as binary literals. Bind those payloads through a BE-side cast to the original string category, preserving string function and comparison typing without replacing bytes. Valid UTF-8 retains the existing text literal types, and BLOB types retain their existing binary behavior. Use value-based binary literal child hashes so equivalent casts remain equal after rebinding and forwarding.

Release note

Preserve non-UTF-8 bytes in MySQL server-prepared string parameters, including JDBC setBytes() and Connector/ODBC binary bindings.

Check List (For Author)

  • Test:
    • Regression test: generated and replayed prepared_stmt_p0/binary_parameters; replayed prepared_stmt_p0/send_long_data. Covers all byte values, malformed UTF-8, parameter reuse, stored HEX/MD5, string expression predicates, NULL/empty values and ordinary Unicode text.
    • Unit Test: 17 tests passed across MysqlParameterLiteralTest and MysqlConnectProcessorLongDataTest, including string wire aliases, cached types, uploads and forwarding.
    • Manual test: Connector/J 8.2.0 server-prepared setBytes, setBinaryStream and setBlob preserve 0080FF4100C328.
    • Manual test: Linux Connector/ODBC 5.3.14 Unicode, 17 cases passed, including 1-MiB binary/Unicode inputs. An additional 17-case proxy-rewritten VARCHAR wire-type probe also passed.
    • FE build and Checkstyle passed.
  • Behavior changed:
    • Yes. Non-UTF-8 string-coded parameters preserve the input bytes instead of substituting U+FFFD. Valid UTF-8 text behavior is unchanged.
  • Does this need documentation?
    • No.

Runtime regression checks used the newly built master FE with an existing 4.1.4 BE and condition cache disabled. The predicate regression uses CONCAT(value, '') = ?; direct constant predicate pushdown on a current master BE was not validated. No BE, storage-format or protocol-field changes are included.

### What problem does this PR solve?

Related PR: apache#69314

Problem Summary: JDBC setBytes and ODBC binary bindings can use MySQL string
wire types. Java UTF-8 replacement decoding silently corrupted their binary
payloads. Decode strictly, retain invalid UTF-8 as binary bytes and bind it
through a BE-side string cast. Preserve valid text behavior and use value-based
binary child hashes for casts reconstructed during reuse and forwarding.

### Release note

Preserve non-UTF-8 bytes in MySQL server-prepared string parameters, including
JDBC setBytes and Connector/ODBC binary bindings.

### Check List (For Author)

- Test: Regression tests and actual JDBC/ODBC driver checks passed; FE build
  and Checkstyle passed. All 17 focused FE unit tests passed.
- Behavior changed: Yes. Preserve malformed UTF-8 bytes instead of replacing
  them while retaining string expression semantics.
- Does this need documentation: No
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@CalvinKirs

Copy link
Copy Markdown
Member Author

run buildall

@CalvinKirs
CalvinKirs force-pushed the fix-mysql-binary-parameters branch from 1a91318 to fa69b45 Compare October 29, 2026 06:16
@CalvinKirs

Copy link
Copy Markdown
Member Author

run buildall

1 similar comment
@CalvinKirs

Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17640	5187	5028	5028
q2	2097	369	263	263
q3	10233	1419	825	825
q4	4749	463	337	337
q5	8115	824	541	541
q6	230	185	150	150
q7	787	792	600	600
q8	10395	1365	1054	1054
q9	5702	4187	4179	4179
q10	6874	1301	1014	1014
q11	430	252	229	229
q12	655	397	281	281
q13	18102	3620	3038	3038
q14	275	267	248	248
q15	q16	722	727	656	656
q17	1204	747	575	575
q18	6952	6180	6112	6112
q19	1124	966	608	608
q20	376	332	224	224
q21	5030	2143	2299	2143
q22	360	296	264	264
Total cold run time: 102052 ms
Total hot run time: 28369 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	5593	5569	5604	5569
q2	673	556	520	520
q3	5267	5406	4952	4952
q4	1994	2165	1566	1566
q5	5244	5143	5147	5143
q6	233	185	141	141
q7	2122	1879	1793	1793
q8	2858	2509	2530	2509
q9	7545	7536	7525	7525
q10	3641	3600	3155	3155
q11	585	420	390	390
q12	680	679	510	510
q13	3275	3645	3041	3041
q14	293	289	263	263
q15	q16	674	731	620	620
q17	7765	7003	6847	6847
q18	13035	12262	12969	12262
q19	938	814	857	814
q20	2161	2167	1921	1921
q21	5883	4597	4711	4597
q22	502	452	420	420
Total cold run time: 70961 ms
Total hot run time: 64558 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 151487 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 fa69b45698b1aa688af7729a4aa149f965c16dc7, data reload: false

query5	1445	557	441	441
query6	431	212	196	196
query7	4795	465	240	240
query8	330	166	149	149
query9	8736	3226	3218	3218
query10	486	304	261	261
query11	6026	3871	3569	3569
query12	152	93	90	90
query13	1246	428	315	315
query14	4873	3926	3638	3638
query14_1	3425	3411	3334	3334
query15	213	199	174	174
query16	815	426	398	398
query17	783	646	520	520
query18	994	410	298	298
query19	210	163	126	126
query20	81	94	81	81
query21	137	127	107	107
query22	13073	12938	12832	12832
query23	13515	12969	12468	12468
query23_1	12485	12671	12616	12616
query24	7364	849	466	466
query24_1	476	491	487	487
query25	561	415	363	363
query26	1198	258	144	144
query27	2752	446	275	275
query28	4618	2074	2078	2074
query29	1630	599	448	448
query30	376	223	185	185
query31	1027	931	824	824
query32	152	99	91	91
query33	534	315	237	237
query34	912	854	514	514
query35	748	757	638	638
query36	826	830	737	737
query37	122	95	83	83
query38	1749	1711	1687	1687
query39	799	795	737	737
query39_1	747	730	740	730
query40	226	118	100	100
query41	74	70	69	69
query42	87	85	84	84
query43	348	361	307	307
query44	1325	711	712	711
query45	184	183	170	170
query46	833	976	571	571
query47	2793	2602	2841	2602
query48	306	316	235	235
query49	863	413	295	295
query50	671	274	222	222
query51	10652	10506	10569	10506
query52	83	82	70	70
query53	189	211	156	156
query54	280	224	211	211
query55	70	69	69	69
query56	266	225	211	211
query57	1642	1636	1568	1568
query58	298	269	262	262
query59	2133	2207	2053	2053
query60	325	251	245	245
query61	164	161	166	161
query62	440	340	288	288
query63	193	164	164	164
query64	2916	959	802	802
query65	3343	3280	3276	3276
query66	1753	410	306	306
query67	20145	20160	20033	20033
query68	2959	1009	611	611
query69	370	287	237	237
query70	850	786	790	786
query71	305	229	213	213
query72	2770	2603	1937	1937
query73	519	524	291	291
query74	4649	4529	4383	4383
query75	2380	2270	1896	1896
query76	2428	1020	584	584
query77	414	362	268	268
query78	9910	9862	9196	9196
query79	1020	860	536	536
query80	558	413	351	351
query81	543	321	276	276
query82	625	134	115	115
query83	236	206	187	187
query84	315	124	111	111
query85	812	444	381	381
query86	387	237	223	223
query87	1992	1944	1825	1825
query88	3861	2817	2791	2791
query89	344	276	241	241
query90	1792	174	172	172
query91	166	152	127	127
query92	97	87	79	79
query93	1081	1029	581	581
query94	523	309	286	286
query95	557	389	318	318
query96	692	498	249	249
query97	2459	2420	2315	2315
query98	162	152	145	145
query99	791	764	654	654
Total cold run time: 222894 ms
Total hot run time: 151487 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 24.25 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit fa69b45698b1aa688af7729a4aa149f965c16dc7, data reload: false

query1	0.00	0.00	0.00
query2	0.09	0.05	0.05
query3	0.25	0.09	0.09
query4	1.61	0.11	0.09
query5	0.23	0.24	0.24
query6	1.17	0.68	0.67
query7	0.04	0.01	0.01
query8	0.06	0.04	0.04
query9	0.39	0.34	0.36
query10	0.57	0.56	0.57
query11	0.21	0.14	0.14
query12	0.18	0.15	0.15
query13	0.48	0.48	0.50
query14	1.04	1.00	1.00
query15	0.65	0.61	0.61
query16	0.35	0.36	0.34
query17	1.13	1.17	1.07
query18	0.21	0.19	0.21
query19	2.06	2.01	2.02
query20	0.02	0.01	0.01
query21	15.49	0.20	0.13
query22	4.88	0.06	0.05
query23	16.30	0.33	0.12
query24	3.00	0.47	0.47
query25	0.11	0.07	0.05
query26	1.06	0.23	0.16
query27	0.06	0.05	0.03
query28	3.29	0.79	0.36
query29	12.48	4.09	3.24
query30	0.28	0.13	0.09
query31	2.77	0.56	0.33
query32	3.22	0.61	0.50
query33	3.23	3.17	3.17
query34	15.30	3.98	3.37
query35	3.33	3.34	3.34
query36	0.55	0.44	0.41
query37	0.10	0.07	0.06
query38	0.05	0.04	0.04
query39	0.03	0.03	0.03
query40	0.18	0.14	0.14
query41	0.09	0.04	0.02
query42	0.03	0.02	0.03
query43	0.04	0.03	0.04
Total cold run time: 96.61 s
Total hot run time: 24.25 s

### What problem does this PR solve?

Issue Number: None

Related PR: apache#69805

Problem Summary: The PR merge commit contained a duplicate normalizeStreamRead helper after master added the same method. Master removed the duplicate in apache#69809. Sync master so the PR merge passes CheckStyle.

### Release note

None

### Check List (For Author)

- Test: Manual test: mvn clean checkstyle:check in fe (passed)
- Behavior changed: No
- Does this need documentation: No
@CalvinKirs

Copy link
Copy Markdown
Member Author

run buildall

@924060929 924060929 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change preserves non-UTF-8 prepared string parameters by retaining their bytes in a binary literal and casting to the original string category on BE.

Static FE review of f4402db found one blocking P2: the new expression-valued bindings reach literal-only cached point-query and Group Commit paths, causing ClassCastException. Please adapt their admission/fallback logic and cover both execution paths. Normal translation, raw-byte forwarding, and value-based child hashing showed no additional blocking issues.

Scope: FE and the necessary BE cast consumer. No builds or tests were run. The supplied current-head CI snapshot is queued and does not establish that required P0 checks have passed. Recommendation: REQUEST_CHANGES.

Automated FE-focused static review (gpt-6.1-sol, xhigh). No build or tests were run.

switch (type) {
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_VARSTRING:
l = new Cast(binary, StringType.INSTANCE);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Keep expression-valued parameters out of literal-only fast paths

This introduces non-Literal bindings without adapting the prepared-execution fast paths. On a point-query-eligible MOW UNIQUE table with a VARCHAR key, execute SELECT ... WHERE k=? with ASCII first, then bind FF using the same string wire type. ExecuteCommand.run reuses the cached point-query plan before analysis, and PointQueryExecutor:165 casts this Cast to Literal, throwing ClassCastException. Prepared INSERTs with group_commit=sync_mode and the default enable_group_commit_full_prepare=true hit the same assumption at GroupCommitPlanner:242. The base produced literals for these bindings. Gate these fast paths on the current bindings' capabilities and reset/fall back to full planning and BE evaluation when necessary. Add coverage for both paths; the new binding tests mock StmtExecutor and do not exercise them.

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17604	5262	5064	5064
q2	2110	352	251	251
q3	10228	1391	817	817
q4	4692	464	335	335
q5	7440	796	528	528
q6	181	180	148	148
q7	758	809	588	588
q8	9249	1324	1049	1049
q9	5504	4194	4188	4188
q10	6817	1273	1047	1047
q11	442	251	225	225
q12	642	404	279	279
q13	18089	3706	3038	3038
q14	268	273	246	246
q15	q16	729	720	665	665
q17	1188	748	568	568
q18	7001	6191	6100	6100
q19	1115	962	585	585
q20	390	330	227	227
q21	5330	2511	2350	2350
q22	386	350	282	282
Total cold run time: 100163 ms
Total hot run time: 28580 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	5988	5910	6159	5910
q2	737	607	588	588
q3	5699	5837	5269	5269
q4	2003	2156	1574	1574
q5	5916	5702	5571	5571
q6	240	192	149	149
q7	2248	2013	1822	1822
q8	3067	2675	2593	2593
q9	7751	7503	7458	7458
q10	3617	3573	3130	3130
q11	585	445	376	376
q12	663	657	507	507
q13	3302	3561	3032	3032
q14	295	287	259	259
q15	q16	662	670	630	630
q17	7783	7009	6914	6914
q18	12959	12184	12894	12184
q19	909	751	751	751
q20	2161	2131	1907	1907
q21	5480	4535	4668	4535
q22	513	462	413	413
Total cold run time: 72578 ms
Total hot run time: 65572 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 151399 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 f4402db98935023ea3a661372ce499f0fed3a420, data reload: false

query5	4309	572	434	434
query6	430	206	198	198
query7	4819	440	236	236
query8	330	163	154	154
query9	8762	3157	3153	3153
query10	493	301	261	261
query11	5993	3861	3557	3557
query12	145	96	86	86
query13	1250	449	321	321
query14	6089	3876	3588	3588
query14_1	3411	3390	3394	3390
query15	211	192	185	185
query16	942	410	371	371
query17	853	628	531	531
query18	2428	424	298	298
query19	189	151	128	128
query20	81	80	84	80
query21	211	129	105	105
query22	13079	12970	12757	12757
query23	13454	12887	12443	12443
query23_1	12660	12453	12721	12453
query24	7236	831	493	493
query24_1	472	485	479	479
query25	535	421	367	367
query26	961	258	137	137
query27	2759	443	275	275
query28	4585	2005	2031	2005
query29	1421	600	461	461
query30	302	224	185	185
query31	986	934	820	820
query32	148	91	91	91
query33	550	317	238	238
query34	900	856	501	501
query35	754	785	635	635
query36	814	818	717	717
query37	125	108	86	86
query38	1788	1753	1676	1676
query39	794	810	752	752
query39_1	742	731	737	731
query40	222	119	98	98
query41	74	71	73	71
query42	83	85	82	82
query43	342	366	313	313
query44	1321	706	706	706
query45	181	186	172	172
query46	841	959	568	568
query47	2845	2850	2902	2850
query48	306	315	228	228
query49	562	411	295	295
query50	689	278	220	220
query51	10617	10798	10700	10700
query52	78	78	70	70
query53	191	212	156	156
query54	244	215	189	189
query55	69	70	69	69
query56	244	225	234	225
query57	1684	1613	1591	1591
query58	293	277	266	266
query59	2157	2171	2000	2000
query60	301	255	231	231
query61	171	162	170	162
query62	397	338	288	288
query63	189	157	163	157
query64	2427	925	722	722
query65	3321	3257	3293	3257
query66	1739	415	294	294
query67	20034	20224	20120	20120
query68	2985	1003	611	611
query69	368	297	231	231
query70	850	776	798	776
query71	298	237	211	211
query72	2744	2593	2325	2325
query73	508	522	287	287
query74	4605	4560	4325	4325
query75	2357	2275	1899	1899
query76	2302	1004	580	580
query77	332	360	264	264
query78	9812	9822	9187	9187
query79	1076	876	528	528
query80	887	422	353	353
query81	576	318	265	265
query82	667	136	104	104
query83	279	192	177	177
query84	307	124	104	104
query85	994	427	366	366
query86	349	238	236	236
query87	1992	1974	1806	1806
query88	3767	2787	2730	2730
query89	331	292	240	240
query90	1696	167	154	154
query91	158	149	131	131
query92	103	87	89	87
query93	1002	1002	572	572
query94	516	311	276	276
query95	572	384	295	295
query96	688	480	244	244
query97	2426	2443	2328	2328
query98	163	153	145	145
query99	773	768	651	651
Total cold run time: 233957 ms
Total hot run time: 151399 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 24.37 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit f4402db98935023ea3a661372ce499f0fed3a420, data reload: false

query1	0.00	0.00	0.00
query2	0.09	0.05	0.05
query3	0.26	0.10	0.09
query4	1.61	0.10	0.10
query5	0.23	0.24	0.24
query6	1.17	0.68	0.67
query7	0.04	0.01	0.01
query8	0.05	0.03	0.04
query9	0.40	0.31	0.36
query10	0.56	0.60	0.57
query11	0.20	0.14	0.16
query12	0.18	0.14	0.15
query13	0.48	0.49	0.49
query14	1.02	1.01	1.00
query15	0.64	0.62	0.61
query16	0.34	0.35	0.34
query17	1.17	1.16	1.15
query18	0.21	0.19	0.20
query19	2.16	2.02	2.01
query20	0.02	0.02	0.01
query21	15.49	0.20	0.14
query22	4.80	0.05	0.05
query23	16.29	0.34	0.12
query24	3.01	0.56	0.44
query25	0.11	0.08	0.05
query26	1.26	0.21	0.15
query27	0.05	0.03	0.03
query28	3.05	0.74	0.36
query29	12.50	4.07	3.24
query30	0.28	0.12	0.09
query31	2.78	0.56	0.33
query32	3.23	0.60	0.50
query33	3.17	3.16	3.30
query34	15.41	4.01	3.44
query35	3.34	3.37	3.34
query36	0.55	0.43	0.44
query37	0.09	0.07	0.06
query38	0.05	0.04	0.04
query39	0.03	0.03	0.04
query40	0.17	0.15	0.14
query41	0.09	0.03	0.02
query42	0.03	0.03	0.03
query43	0.04	0.04	0.03
Total cold run time: 96.65 s
Total hot run time: 24.37 s

### What problem does this PR solve?

Related PR: apache#69805

Problem Summary: Non-UTF-8 prepared string parameters are bound as binary-to-string casts. Cached point queries and fully prepared Group Commit inserts require literal bindings and would throw ClassCastException for these expressions. Check the current bindings before entering either fast path, refresh cached point-query plans when bindings require evaluation, and clear inherited point-query flags before normal planning. Keep literal bindings eligible for existing fast paths.

### Release note

Avoid prepared-statement execution failures when binary string parameters follow text parameters in point queries or Group Commit inserts.

### Check List (For Author)

- Test: Unit Test / ExecuteCommandTest, MysqlParameterLiteralTest, MysqlConnectProcessorLongDataTest, PointQueryExecutorTest and GroupCommitPlannerTest via run-fe-ut.sh; FE Checkstyle
- Behavior changed: Yes. Expression-valued parameters use normal planning and BE evaluation instead of literal-only prepared fast paths.
- Does this need documentation: No
@CalvinKirs

Copy link
Copy Markdown
Member Author

run buildall

@CalvinKirs

Copy link
Copy Markdown
Member Author

Local pipeline review — ✅ PASS

schema: doris-repo-review/v1
status: PASS
pr: apache/doris#69805
commit: 96e2a12c6bee44c44647f52c542967be5f402b1f
base: 0976b2cd5020607205969bf7986dcb551b6a7325
reviewed_at: 2026-11-03T12:37+08:00
reviewer: CalvinKirs
model: gpt-6.1-sol
effort: xhigh
findings: {blocker: 0, major: 0, minor: 0, nit: 0}
rounds: 1
converged: true

Notes for maintainers

  • fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/commands/ExecuteCommandTest.java:81 — The three new routing tests exercise the real ExecuteCommand admission and refresh logic, with downstream consumers mocked. All 34 selected FE tests and Checkstyle passed; all three new tests fail on the old production implementation and pass after restoration.
  • No live-cluster regression, point-query/Group Commit RPC, performance workload or mixed-release execution was run for this repair. Existing regression outputs were inspected, not regenerated.

Reviewed locally with the doris-repo-review pipeline (a local port of .github/workflows/code-review-runner.yml). This is not a CI status check.

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 28279 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 96e2a12c6bee44c44647f52c542967be5f402b1f, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17603	5105	5013	5013
q2	2124	358	280	280
q3	10167	1408	818	818
q4	4674	460	338	338
q5	7439	786	536	536
q6	182	185	150	150
q7	751	783	593	593
q8	9258	1313	1059	1059
q9	5513	4196	4186	4186
q10	6799	1281	1026	1026
q11	424	252	231	231
q12	636	395	276	276
q13	18085	3583	2992	2992
q14	284	270	267	267
q15	q16	739	724	660	660
q17	1195	749	568	568
q18	6914	6165	6109	6109
q19	1090	964	594	594
q20	386	343	222	222
q21	5188	2107	2245	2107
q22	344	297	254	254
Total cold run time: 99795 ms
Total hot run time: 28279 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	5567	5583	5595	5583
q2	671	554	546	546
q3	5211	5369	4963	4963
q4	1963	2145	1543	1543
q5	5224	5153	5457	5153
q6	253	199	154	154
q7	2381	2054	1892	1892
q8	3023	2635	2737	2635
q9	8000	7956	7904	7904
q10	3769	3910	3238	3238
q11	630	444	413	413
q12	696	705	529	529
q13	3543	3826	3333	3333
q14	327	311	283	283
q15	q16	705	720	646	646
q17	8172	6970	7084	6970
q18	12962	12181	12830	12181
q19	909	765	766	765
q20	2146	2184	1923	1923
q21	5630	4557	4718	4557
q22	487	496	406	406
Total cold run time: 72269 ms
Total hot run time: 65617 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 151388 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 96e2a12c6bee44c44647f52c542967be5f402b1f, data reload: false

query5	4307	582	429	429
query6	427	216	196	196
query7	4814	448	230	230
query8	337	163	148	148
query9	8784	3168	3140	3140
query10	484	323	263	263
query11	5964	3877	3583	3583
query12	148	91	88	88
query13	1262	436	344	344
query14	6152	3925	3636	3636
query14_1	3422	3375	3393	3375
query15	204	206	183	183
query16	940	431	417	417
query17	853	674	535	535
query18	2415	426	314	314
query19	205	170	138	138
query20	86	86	87	86
query21	208	132	106	106
query22	12942	13055	12826	12826
query23	13457	12889	12476	12476
query23_1	12646	12463	12456	12456
query24	7377	833	467	467
query24_1	488	484	496	484
query25	533	424	356	356
query26	1264	261	142	142
query27	2753	447	281	281
query28	4593	2032	2021	2021
query29	1608	589	429	429
query30	303	223	186	186
query31	1016	938	819	819
query32	142	92	85	85
query33	509	292	234	234
query34	898	880	529	529
query35	741	770	643	643
query36	835	815	750	750
query37	126	92	84	84
query38	1787	1768	1675	1675
query39	792	794	753	753
query39_1	742	733	744	733
query40	219	114	93	93
query41	65	62	61	61
query42	92	86	83	83
query43	353	356	306	306
query44	1313	706	704	704
query45	181	175	164	164
query46	834	955	568	568
query47	2835	3019	2826	2826
query48	309	308	217	217
query49	585	410	303	303
query50	691	292	211	211
query51	10726	10853	10369	10369
query52	78	76	71	71
query53	184	211	153	153
query54	251	196	190	190
query55	75	67	62	62
query56	238	217	205	205
query57	1626	1612	1577	1577
query58	279	275	262	262
query59	2196	2205	2002	2002
query60	299	249	215	215
query61	154	150	150	150
query62	380	326	287	287
query63	189	159	163	159
query64	2768	923	775	775
query65	3325	3287	3265	3265
query66	1770	414	310	310
query67	20100	20245	20127	20127
query68	2991	996	626	626
query69	386	276	251	251
query70	854	795	768	768
query71	292	240	208	208
query72	2642	2514	2288	2288
query73	505	528	295	295
query74	4606	4480	4333	4333
query75	2321	2320	1918	1918
query76	2340	1039	593	593
query77	353	372	273	273
query78	9633	9740	9193	9193
query79	927	858	538	538
query80	554	455	373	373
query81	532	322	280	280
query82	499	137	118	118
query83	307	211	189	189
query84	328	132	113	113
query85	889	524	365	365
query86	320	239	236	236
query87	1994	1921	1814	1814
query88	3743	2749	2738	2738
query89	330	283	250	250
query90	1850	166	169	166
query91	162	150	135	135
query92	91	87	91	87
query93	999	999	577	577
query94	448	310	262	262
query95	576	316	299	299
query96	686	483	237	237
query97	2441	2411	2337	2337
query98	161	154	150	150
query99	767	763	655	655
Total cold run time: 234030 ms
Total hot run time: 151388 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 24.33 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 96e2a12c6bee44c44647f52c542967be5f402b1f, data reload: false

query1	0.00	0.00	0.00
query2	0.10	0.05	0.05
query3	0.27	0.09	0.08
query4	1.61	0.11	0.12
query5	0.26	0.24	0.24
query6	1.17	0.67	0.67
query7	0.04	0.01	0.00
query8	0.06	0.04	0.04
query9	0.41	0.35	0.37
query10	0.56	0.57	0.60
query11	0.20	0.14	0.14
query12	0.19	0.14	0.14
query13	0.50	0.49	0.50
query14	1.03	1.04	1.01
query15	0.63	0.62	0.62
query16	0.35	0.35	0.34
query17	1.13	1.17	1.09
query18	0.21	0.19	0.20
query19	2.10	1.92	1.98
query20	0.02	0.01	0.02
query21	15.50	0.21	0.13
query22	4.92	0.06	0.05
query23	16.26	0.32	0.13
query24	2.58	0.52	0.49
query25	0.10	0.08	0.06
query26	1.28	0.21	0.15
query27	0.05	0.04	0.04
query28	3.66	0.85	0.35
query29	12.52	4.10	3.26
query30	0.29	0.13	0.10
query31	2.77	0.58	0.33
query32	3.23	0.60	0.50
query33	3.26	3.18	3.29
query34	15.27	4.01	3.39
query35	3.35	3.33	3.33
query36	0.55	0.43	0.44
query37	0.09	0.07	0.06
query38	0.05	0.04	0.03
query39	0.04	0.03	0.03
query40	0.17	0.14	0.14
query41	0.08	0.03	0.03
query42	0.03	0.03	0.03
query43	0.05	0.03	0.03
Total cold run time: 96.94 s
Total hot run time: 24.33 s

@924060929 924060929 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String-coded prepared parameters can contain arbitrary bytes. This change preserves invalid UTF-8 as binary literals and casts them to the original string category during normal BE evaluation, while retaining existing valid-text and BLOB behavior.

Independent static review of 96e2a12 against merge-base 0976b2c found no blocking FE issues. I checked decoding, placeholder binding, constant-folding boundaries, translation, raw-byte forwarding, content-based hashing, and prepared-execution fallback. The previous P2 concerning literal-only point-query and Group Commit fast paths is fixed by the binding admission checks and state reset/replanning logic, with targeted routing tests added.

Recommendation: APPROVE within the FE scope and necessary BE consumers. No builds or tests were run during this review. The supplied head snapshot reports successful compilation, FE UT and P0 regressions, but failed FE coverage. Required-check rules were not supplied; merge eligibility is separate from this code recommendation.

Automated FE-focused static review (gpt-6.1-sol, high). No build or tests were run.

@CalvinKirs
CalvinKirs merged commit 1aa505c into apache:master Nov 3, 2026
35 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants