Skip to content

Conversation

@dataroaring
Copy link
Contributor

Add support for unique_key_update_mode property in routine load to enable flexible partial columns update. This allows different rows in the same batch to update different columns, unlike fixed partial update where all rows must update the same columns.

Changes:

  • Add unique_key_update_mode property to CreateRoutineLoadInfo with values: UPSERT (default), UPDATE_FIXED_COLUMNS, UPDATE_FLEXIBLE_COLUMNS
  • Add validation for flexible partial update constraints (JSON format only, no jsonpaths, no fuzzy_parse, no COLUMNS clause, no WHERE clause, table must have skip_bitmap column enabled)
  • Update RoutineLoadJob to persist and restore the update mode
  • Update KafkaRoutineLoadJob to pass update mode to task info
  • Support ALTER ROUTINE LOAD to change unique_key_update_mode
  • Add regression tests covering basic usage and error cases
  • Fix HashMap ordering issue in gsonPostProcess for backward compatibility
  • Add validation when ALTER changes mode to UPDATE_FLEXIBLE_COLUMNS
  • Add comprehensive ALTER test cases for flexible partial update validation

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

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?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

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

Add support for `unique_key_update_mode` property in routine load to enable
flexible partial columns update. This allows different rows in the same batch
to update different columns, unlike fixed partial update where all rows must
update the same columns.

Changes:
- Add `unique_key_update_mode` property to CreateRoutineLoadInfo with values:
  UPSERT (default), UPDATE_FIXED_COLUMNS, UPDATE_FLEXIBLE_COLUMNS
- Add validation for flexible partial update constraints (JSON format only,
  no jsonpaths, no fuzzy_parse, no COLUMNS clause, no WHERE clause, table
  must have skip_bitmap column enabled)
- Update RoutineLoadJob to persist and restore the update mode
- Update KafkaRoutineLoadJob to pass update mode to task info
- Support ALTER ROUTINE LOAD to change unique_key_update_mode
- Add regression tests covering basic usage and error cases
- Fix HashMap ordering issue in gsonPostProcess for backward compatibility
- Add validation when ALTER changes mode to UPDATE_FLEXIBLE_COLUMNS
- Add comprehensive ALTER test cases for flexible partial update validation
Copilot AI review requested due to automatic review settings January 14, 2026 23:37
@Thearas
Copy link
Contributor

Thearas commented Jan 14, 2026

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?

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for flexible partial columns update in routine load jobs, enabling different rows in the same batch to update different columns. This is achieved by introducing the unique_key_update_mode property with three modes: UPSERT (default), UPDATE_FIXED_COLUMNS (backward compatible with partial_columns), and UPDATE_FLEXIBLE_COLUMNS (new flexible mode).

Changes:

  • Introduced unique_key_update_mode property to configure update behavior with three modes
  • Added validation logic for flexible partial update constraints (JSON format, no jsonpaths, no fuzzy_parse, skip_bitmap column required, etc.)
  • Updated ALTER ROUTINE LOAD to support changing the update mode with appropriate validation
  • Added comprehensive regression tests covering basic usage, error cases, and ALTER operations

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
CreateRoutineLoadInfo.java Added unique_key_update_mode property parsing, validation, and flexible partial update constraint checks
AlterRoutineLoadCommand.java Added support for altering unique_key_update_mode property with validation
RoutineLoadJob.java Added update mode persistence, restoration in gsonPostProcess, and validation logic for ALTER operations
KafkaRoutineLoadJob.java Updated to pass uniqueKeyUpdateMode to task info and changed method signature to throw UserException
NereidsRoutineLoadTaskInfo.java Changed constructor to accept uniqueKeyUpdateMode instead of isPartialUpdate flag
test_routine_load_flexible_partial_update.groovy Comprehensive test suite with 21 test cases covering feature functionality and error scenarios
test_routine_load_flexible_partial_update.out Expected output for regression tests
Comments suppressed due to low confidence (2)

fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadJob.java:1

  • The modifyPropertiesInternal method in KafkaRoutineLoadJob doesn't synchronize with the new modifyCommonJobProperties logic. When PARTIAL_COLUMNS is set here, it doesn't update uniqueKeyUpdateMode, which could lead to inconsistency. This code should be removed since modifyCommonJobProperties (called at line 792) now handles PARTIAL_COLUMNS and uniqueKeyUpdateMode synchronization.
// Licensed to the Apache Software Foundation (ASF) under one

fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadJob.java:1

  • This code duplicates the PARTIAL_UPDATE_NEW_KEY_POLICY handling that already exists in modifyCommonJobProperties. Since modifyCommonJobProperties is called first at line 792, this duplicate code can be removed to avoid redundancy and potential inconsistency.
// Licensed to the Apache Software Foundation (ASF) under one

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +224 to +255
// Backward compatibility: partial_columns=true maps to UPDATE_FIXED_COLUMNS
this.isPartialUpdate = this.jobProperties.getOrDefault(PARTIAL_COLUMNS, "false").equalsIgnoreCase("true");
if (this.isPartialUpdate) {
this.uniqueKeyUpdateMode = TUniqueKeyUpdateMode.UPDATE_FIXED_COLUMNS;
}
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

When both partial_columns and unique_key_update_mode are specified in jobProperties, the order of processing matters due to HashMap iteration. Consider adding validation in checkJobProperties to prevent users from specifying conflicting combinations like partial_columns=false with unique_key_update_mode=UPDATE_FIXED_COLUMNS.

Copilot uses AI. Check for mistakes.
(
"max_batch_interval" = "10",
"format" = "json",
"jsonpaths" = "[\\"\\$.id\\", \\"\\$.name\\", \\"\\$.score\\"]"
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

The excessive escaping in jsonpaths string makes it hard to read. Consider using single quotes for the outer string or triple-quoted strings in Groovy to improve readability: "jsonpaths" = '["$.id", "$.name", "$.score"]'

Copilot uses AI. Check for mistakes.
this.isPartialUpdate = Boolean.parseBoolean(
jobProperties.remove(CreateRoutineLoadInfo.PARTIAL_COLUMNS));
if (this.isPartialUpdate && uniqueKeyUpdateMode == TUniqueKeyUpdateMode.UPSERT) {
this.uniqueKeyUpdateMode = TUniqueKeyUpdateMode.UPDATE_FIXED_COLUMNS;
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

When PARTIAL_COLUMNS is set to false but uniqueKeyUpdateMode is already UPDATE_FIXED_COLUMNS (e.g., from a previous ALTER), this code doesn't reset uniqueKeyUpdateMode back to UPSERT. This could leave the job in an inconsistent state. Add: 'else if (!this.isPartialUpdate && uniqueKeyUpdateMode == TUniqueKeyUpdateMode.UPDATE_FIXED_COLUMNS) { this.uniqueKeyUpdateMode = TUniqueKeyUpdateMode.UPSERT; }'

Suggested change
this.uniqueKeyUpdateMode = TUniqueKeyUpdateMode.UPDATE_FIXED_COLUMNS;
this.uniqueKeyUpdateMode = TUniqueKeyUpdateMode.UPDATE_FIXED_COLUMNS;
} else if (!this.isPartialUpdate && uniqueKeyUpdateMode == TUniqueKeyUpdateMode.UPDATE_FIXED_COLUMNS) {
this.uniqueKeyUpdateMode = TUniqueKeyUpdateMode.UPSERT;

Copilot uses AI. Check for mistakes.
Comment on lines +1958 to +1964
// Backward compatibility: if unique_key_update_mode is not set, use partial_columns
if (uniqueKeyUpdateMode == TUniqueKeyUpdateMode.UPSERT) {
isPartialUpdate = Boolean.parseBoolean(v);
if (isPartialUpdate) {
uniqueKeyUpdateMode = TUniqueKeyUpdateMode.UPDATE_FIXED_COLUMNS;
}
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

The gsonPostProcess logic doesn't handle the case where PARTIAL_COLUMNS is 'false' but uniqueKeyUpdateMode was previously UPDATE_FIXED_COLUMNS. When deserializing old metadata, if partial_columns=false is processed, it should reset uniqueKeyUpdateMode to UPSERT for consistency. Add an else branch to handle this case.

Suggested change
// Backward compatibility: if unique_key_update_mode is not set, use partial_columns
if (uniqueKeyUpdateMode == TUniqueKeyUpdateMode.UPSERT) {
isPartialUpdate = Boolean.parseBoolean(v);
if (isPartialUpdate) {
uniqueKeyUpdateMode = TUniqueKeyUpdateMode.UPDATE_FIXED_COLUMNS;
}
boolean partialColumns = Boolean.parseBoolean(v);
// Backward compatibility: if unique_key_update_mode is not set, use partial_columns
if (uniqueKeyUpdateMode == TUniqueKeyUpdateMode.UPSERT) {
isPartialUpdate = partialColumns;
if (isPartialUpdate) {
uniqueKeyUpdateMode = TUniqueKeyUpdateMode.UPDATE_FIXED_COLUMNS;
}
} else if (!partialColumns
&& uniqueKeyUpdateMode == TUniqueKeyUpdateMode.UPDATE_FIXED_COLUMNS) {
// Backward compatibility: if partial_columns is false but unique_key_update_mode
// was UPDATE_FIXED_COLUMNS, reset to UPSERT for consistency
isPartialUpdate = false;
uniqueKeyUpdateMode = TUniqueKeyUpdateMode.UPSERT;

Copilot uses AI. Check for mistakes.
Comment on lines 632 to 630
// Check for conflicting settings: partial_columns=true with unique_key_update_mode=UPSERT
if (jobProperties.containsKey(PARTIAL_COLUMNS)
&& jobProperties.get(PARTIAL_COLUMNS).equalsIgnoreCase("true")
&& "UPSERT".equals(modeStr)) {
throw new AnalysisException("Cannot set both 'partial_columns=true' and "
+ "'unique_key_update_mode=UPSERT'. "
+ "Use unique_key_update_mode=UPDATE_FIXED_COLUMNS instead.");
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

This validation only checks for the conflicting case (partial_columns=true with UPSERT) but doesn't check for partial_columns=false with UPDATE_FIXED_COLUMNS or UPDATE_FLEXIBLE_COLUMNS, which is also conflicting. Add validation for these cases as well to ensure consistency.

Suggested change
// Check for conflicting settings: partial_columns=true with unique_key_update_mode=UPSERT
if (jobProperties.containsKey(PARTIAL_COLUMNS)
&& jobProperties.get(PARTIAL_COLUMNS).equalsIgnoreCase("true")
&& "UPSERT".equals(modeStr)) {
throw new AnalysisException("Cannot set both 'partial_columns=true' and "
+ "'unique_key_update_mode=UPSERT'. "
+ "Use unique_key_update_mode=UPDATE_FIXED_COLUMNS instead.");
// Check for conflicting settings between partial_columns and unique_key_update_mode
if (jobProperties.containsKey(PARTIAL_COLUMNS)) {
String partialColumnsVal = jobProperties.get(PARTIAL_COLUMNS);
// partial_columns=true is not allowed with UPSERT
if (partialColumnsVal.equalsIgnoreCase("true")
&& "UPSERT".equals(modeStr)) {
throw new AnalysisException("Cannot set both 'partial_columns=true' and "
+ "'unique_key_update_mode=UPSERT'. "
+ "Use unique_key_update_mode=UPDATE_FIXED_COLUMNS instead.");
}
// partial_columns=false is not allowed with UPDATE_FIXED_COLUMNS or UPDATE_FLEXIBLE_COLUMNS
if (partialColumnsVal.equalsIgnoreCase("false")
&& ("UPDATE_FIXED_COLUMNS".equals(modeStr)
|| "UPDATE_FLEXIBLE_COLUMNS".equals(modeStr))) {
throw new AnalysisException("Cannot set 'partial_columns=false' when "
+ "'unique_key_update_mode' is 'UPDATE_FIXED_COLUMNS' or 'UPDATE_FLEXIBLE_COLUMNS'. "
+ "Use unique_key_update_mode=UPSERT instead, or enable partial columns.");
}

Copilot uses AI. Check for mistakes.
@dataroaring dataroaring force-pushed the routineload_flexible_update branch 2 times, most recently from c821a14 to bf7fe5d Compare January 15, 2026 00:00
1. Fix checkstyle: line length exceeds 120 characters
   - Split long exception message string to comply with 120-character limit

2. Add shared parseUniqueKeyUpdateMode() helper methods in CreateRoutineLoadInfo
   - parseUniqueKeyUpdateMode(String): returns TUniqueKeyUpdateMode or null
   - parseAndValidateUniqueKeyUpdateMode(String): validates and throws on error
   - Replaces duplicated switch/if-else logic across 4 files

3. Add OlapTable.validateForFlexiblePartialUpdate() method
   - Centralizes table-level validation (MoW, skip_bitmap, light_schema_change, variant)
   - Used by CreateRoutineLoadInfo, RoutineLoadJob, and NereidsStreamLoadPlanner

4. Update all callers to use shared validation methods
   - Reduces code duplication and ensures consistent error messages

5. Allow jsonpaths, WHERE clause, and MERGE/DELETE with flexible partial update
   - Removed restrictions that blocked these features
@dataroaring dataroaring force-pushed the routineload_flexible_update branch from bf7fe5d to 3353055 Compare January 15, 2026 00:01
@dataroaring
Copy link
Contributor Author

Code review

Found 1 issue:

  1. Test/code mismatch for WHERE clause and jsonpaths validation - The test file expects validation errors for jsonpaths (Test 4, Test 16) and WHERE clause (Test 7, Test 18), but the code does NOT implement these validations. The validateFlexiblePartialUpdate() methods only check for JSON format, fuzzy_parse, and COLUMNS specification. Either update the tests to reflect the new behavior (allowing jsonpaths and WHERE clause), or restore the validations if their removal was unintended.

"""
exception "Flexible partial update does not support jsonpaths"
}

Test expects:

exception "Flexible partial update does not support jsonpaths"

But validateFlexiblePartialUpdate() in CreateRoutineLoadInfo.java does not check for jsonpaths:

private void validateFlexiblePartialUpdate(OlapTable table) throws UserException {
// Validate table-level constraints (MoW, skip_bitmap, light_schema_change, variant columns)
table.validateForFlexiblePartialUpdate();
// Routine load specific validations
// Must use JSON format
String format = jobProperties.getOrDefault(FileFormatProperties.PROP_FORMAT, "csv");
if (!"json".equalsIgnoreCase(format)) {
throw new AnalysisException("Flexible partial update only supports JSON format, but found: " + format);
}
// Cannot use fuzzy_parse
if (Boolean.parseBoolean(jobProperties.getOrDefault(JsonFileFormatProperties.PROP_FUZZY_PARSE, "false"))) {
throw new AnalysisException("Flexible partial update does not support fuzzy_parse");
}
// Cannot specify COLUMNS mapping
if (loadPropertyMap != null && loadPropertyMap.values().stream()
.anyMatch(p -> p instanceof LoadColumnClause)) {
throw new AnalysisException("Flexible partial update does not support COLUMNS specification");
}
}

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

1. Fix exception type mismatch in KafkaRoutineLoadJob.replayModifyProperties
   - Changed catch block from DdlException to UserException since
     modifyPropertiesInternal now throws UserException

2. Fix setSchemaForPartialUpdate not called for flexible partial update
   - Changed condition from isPartialUpdate to check both
     UPDATE_FIXED_COLUMNS and UPDATE_FLEXIBLE_COLUMNS modes
   - Aligns with StreamLoadHandler behavior

3. Update tests to allow WHERE clause and jsonpaths with flexible partial update
   - Tests 4, 7, 16, 18 now verify these features work correctly
   - Added expected output for new success test cases
@dataroaring
Copy link
Contributor Author

run buildall

- Test parseUniqueKeyUpdateMode() with valid/invalid mode strings
- Test parseAndValidateUniqueKeyUpdateMode() with exception handling
- Test backward compatibility: partial_columns=true maps to UPDATE_FIXED_COLUMNS
- Test unique_key_update_mode takes precedence over partial_columns
@dataroaring
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17650	4144	4024	4024
q2	2021	366	251	251
q3	10157	1273	696	696
q4	10230	907	315	315
q5	7505	2135	1844	1844
q6	188	172	138	138
q7	938	800	669	669
q8	9271	1334	1098	1098
q9	4804	4551	4514	4514
q10	6712	1807	1372	1372
q11	515	287	278	278
q12	693	760	570	570
q13	17794	3862	3109	3109
q14	293	289	273	273
q15	572	507	499	499
q16	677	675	639	639
q17	647	770	493	493
q18	6637	6306	6323	6306
q19	1091	964	615	615
q20	398	354	239	239
q21	2985	2423	2278	2278
q22	1030	1014	958	958
Total cold run time: 102808 ms
Total hot run time: 31178 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4136	4052	4045	4045
q2	320	379	335	335
q3	2101	2582	2224	2224
q4	1312	1810	1319	1319
q5	4098	4021	4068	4021
q6	204	165	126	126
q7	1857	1819	1697	1697
q8	2866	2496	2481	2481
q9	7271	7276	7183	7183
q10	2786	2739	2402	2402
q11	578	508	465	465
q12	742	779	677	677
q13	3574	4124	3379	3379
q14	303	298	279	279
q15	550	520	523	520
q16	679	677	652	652
q17	1327	1363	1390	1363
q18	8113	7792	8097	7792
q19	863	840	846	840
q20	2064	2041	1909	1909
q21	4846	4506	4287	4287
q22	1135	1041	970	970
Total cold run time: 51725 ms
Total hot run time: 48966 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 173916 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 93bcfcd7f4922a953e6a75db16a8767941824b21, data reload: false

query5	4401	617	473	473
query6	345	229	215	215
query7	4227	464	254	254
query8	345	261	251	251
query9	8750	2894	2863	2863
query10	475	377	339	339
query11	15243	15249	14930	14930
query12	162	116	112	112
query13	1248	488	363	363
query14	5667	3018	2726	2726
query14_1	2678	2665	2673	2665
query15	197	190	175	175
query16	1004	491	462	462
query17	1111	683	595	595
query18	2442	455	344	344
query19	229	227	216	216
query20	119	114	113	113
query21	216	141	121	121
query22	3883	4025	3991	3991
query23	16073	15564	15295	15295
query23_1	15506	15396	15559	15396
query24	7138	1553	1201	1201
query24_1	1181	1180	1189	1180
query25	561	483	436	436
query26	1248	273	162	162
query27	2751	465	283	283
query28	4562	2127	2129	2127
query29	785	553	459	459
query30	311	232	215	215
query31	772	636	567	567
query32	86	88	76	76
query33	545	368	321	321
query34	935	901	521	521
query35	740	768	694	694
query36	883	885	853	853
query37	187	109	84	84
query38	2766	2790	2708	2708
query39	783	756	719	719
query39_1	712	712	706	706
query40	226	146	126	126
query41	75	71	67	67
query42	105	103	105	103
query43	448	483	469	469
query44	1319	736	735	735
query45	189	186	181	181
query46	837	950	581	581
query47	1511	1520	1414	1414
query48	324	330	249	249
query49	615	446	348	348
query50	617	281	216	216
query51	3825	3821	3773	3773
query52	109	108	97	97
query53	288	329	275	275
query54	307	289	284	284
query55	84	81	80	80
query56	325	363	313	313
query57	1008	1026	944	944
query58	281	274	258	258
query59	2045	2125	2105	2105
query60	346	330	324	324
query61	154	152	157	152
query62	413	372	329	329
query63	298	257	263	257
query64	4885	1311	996	996
query65	3807	3794	3754	3754
query66	1474	435	322	322
query67	15431	14880	14603	14603
query68	7585	997	699	699
query69	515	357	327	327
query70	1025	968	883	883
query71	372	307	289	289
query72	5774	3379	3345	3345
query73	770	723	317	317
query74	8738	8802	8640	8640
query75	2814	2811	2480	2480
query76	3382	1079	651	651
query77	522	386	318	318
query78	9769	9669	9187	9187
query79	1540	898	570	570
query80	703	630	485	485
query81	526	266	236	236
query82	212	153	115	115
query83	265	257	239	239
query84	259	116	100	100
query85	900	530	459	459
query86	391	297	293	293
query87	2845	2884	2772	2772
query88	4289	2578	2555	2555
query89	430	357	324	324
query90	2259	175	166	166
query91	179	166	141	141
query92	94	74	69	69
query93	2196	908	522	522
query94	803	320	292	292
query95	699	391	314	314
query96	648	501	233	233
query97	2349	2368	2344	2344
query98	229	200	195	195
query99	598	598	521	521
Total cold run time: 255673 ms
Total hot run time: 173916 ms

@doris-robot
Copy link

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

query1	0.05	0.05	0.05
query2	0.09	0.04	0.04
query3	0.26	0.08	0.09
query4	1.61	0.11	0.11
query5	0.28	0.26	0.25
query6	1.14	0.66	0.66
query7	0.03	0.03	0.02
query8	0.05	0.04	0.04
query9	0.56	0.48	0.48
query10	0.55	0.56	0.54
query11	0.13	0.09	0.10
query12	0.14	0.11	0.11
query13	0.59	0.58	0.60
query14	0.98	0.95	0.95
query15	0.78	0.77	0.78
query16	0.40	0.40	0.42
query17	1.08	1.05	1.07
query18	0.23	0.21	0.22
query19	1.94	1.89	1.92
query20	0.02	0.01	0.01
query21	15.44	0.24	0.13
query22	5.13	0.05	0.04
query23	15.71	0.29	0.10
query24	1.66	0.69	0.81
query25	0.11	0.07	0.12
query26	0.14	0.14	0.13
query27	0.08	0.05	0.05
query28	4.47	1.06	0.88
query29	12.53	3.94	3.17
query30	0.27	0.13	0.12
query31	2.81	0.64	0.39
query32	3.24	0.54	0.45
query33	3.06	3.04	3.01
query34	16.07	5.05	4.40
query35	4.46	4.46	4.43
query36	0.65	0.49	0.49
query37	0.11	0.07	0.06
query38	0.07	0.05	0.04
query39	0.05	0.03	0.04
query40	0.17	0.15	0.13
query41	0.08	0.03	0.03
query42	0.05	0.03	0.03
query43	0.05	0.03	0.04
Total cold run time: 97.32 s
Total hot run time: 27.23 s

Test the backward compatibility and precedence logic directly
without calling gsonPostProcess() which requires origStmt
@dataroaring
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17745	4288	4076	4076
q2	2184	383	236	236
q3	10174	1235	713	713
q4	10230	804	294	294
q5	7491	2028	1908	1908
q6	191	174	142	142
q7	924	813	679	679
q8	9267	1375	1176	1176
q9	5176	4660	4586	4586
q10	7078	1810	1416	1416
q11	617	293	274	274
q12	721	735	610	610
q13	17794	3854	3113	3113
q14	305	295	265	265
q15	591	521	505	505
q16	675	692	641	641
q17	655	776	516	516
q18	6669	6395	7015	6395
q19	1321	1162	653	653
q20	402	407	249	249
q21	3298	2732	2715	2715
q22	1115	1089	1026	1026
Total cold run time: 104623 ms
Total hot run time: 32188 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4211	4235	4309	4235
q2	329	401	337	337
q3	2368	2793	2432	2432
q4	1424	1941	1484	1484
q5	4500	4199	4218	4199
q6	223	176	133	133
q7	1978	1967	1826	1826
q8	2583	2376	2376	2376
q9	6990	7009	7168	7009
q10	2600	2712	2321	2321
q11	597	471	464	464
q12	710	749	609	609
q13	3713	3909	3125	3125
q14	271	279	254	254
q15	523	498	485	485
q16	612	664	623	623
q17	1083	1331	1358	1331
q18	7299	7279	7240	7240
q19	826	799	824	799
q20	1895	1993	1794	1794
q21	4615	4253	4170	4170
q22	1028	1007	980	980
Total cold run time: 50378 ms
Total hot run time: 48226 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 174083 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 7931212a840c9f804e16b116001e8d7921146aaf, data reload: false

query5	4411	619	492	492
query6	336	230	246	230
query7	4230	449	250	250
query8	372	248	243	243
query9	8729	2891	2895	2891
query10	536	410	341	341
query11	15145	15048	14743	14743
query12	196	115	112	112
query13	1259	468	393	393
query14	6475	3056	2862	2862
query14_1	2679	2681	2671	2671
query15	210	194	171	171
query16	3419	514	472	472
query17	1093	686	577	577
query18	2281	447	340	340
query19	224	222	199	199
query20	124	116	117	116
query21	605	136	121	121
query22	3970	3878	3836	3836
query23	16070	15578	15243	15243
query23_1	15612	15510	15392	15392
query24	7198	1561	1189	1189
query24_1	1164	1206	1210	1206
query25	560	470	422	422
query26	1266	266	160	160
query27	2672	439	282	282
query28	4486	2138	2131	2131
query29	743	543	448	448
query30	370	246	209	209
query31	835	629	565	565
query32	88	77	80	77
query33	604	369	326	326
query34	907	865	528	528
query35	724	762	689	689
query36	907	941	836	836
query37	167	100	83	83
query38	2716	2701	2638	2638
query39	798	768	745	745
query39_1	715	710	713	710
query40	217	130	116	116
query41	67	63	63	63
query42	105	100	112	100
query43	433	426	437	426
query44	1322	736	728	728
query45	191	185	188	185
query46	831	935	571	571
query47	1434	1373	1352	1352
query48	325	326	239	239
query49	594	420	339	339
query50	620	281	212	212
query51	3752	3807	3754	3754
query52	102	104	99	99
query53	288	322	273	273
query54	283	262	302	262
query55	82	79	76	76
query56	299	312	298	298
query57	1056	978	960	960
query58	265	264	252	252
query59	1903	2098	2082	2082
query60	333	327	321	321
query61	164	157	155	155
query62	384	357	308	308
query63	298	267	269	267
query64	4570	1255	981	981
query65	3752	3801	3746	3746
query66	1298	433	327	327
query67	15434	15649	15548	15548
query68	2458	1094	736	736
query69	459	375	337	337
query70	1008	912	921	912
query71	338	311	299	299
query72	5401	3190	3366	3190
query73	607	722	316	316
query74	8845	8764	8580	8580
query75	2753	2800	2485	2485
query76	1852	1048	666	666
query77	375	399	306	306
query78	9754	10012	9140	9140
query79	1064	908	582	582
query80	1284	581	489	489
query81	547	265	235	235
query82	973	150	110	110
query83	319	256	239	239
query84	257	118	98	98
query85	932	505	459	459
query86	419	324	321	321
query87	2872	2844	2785	2785
query88	3491	2573	2568	2568
query89	396	352	333	333
query90	2047	172	171	171
query91	172	168	148	148
query92	77	75	71	71
query93	1049	900	525	525
query94	635	321	287	287
query95	591	397	321	321
query96	631	513	231	231
query97	2335	2367	2341	2341
query98	213	206	210	206
query99	649	582	506	506
Total cold run time: 250430 ms
Total hot run time: 174083 ms

@doris-robot
Copy link

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

query1	0.05	0.05	0.05
query2	0.14	0.04	0.04
query3	0.27	0.08	0.09
query4	1.60	0.11	0.12
query5	0.27	0.24	0.24
query6	1.16	0.64	0.64
query7	0.03	0.03	0.02
query8	0.06	0.04	0.05
query9	0.58	0.51	0.50
query10	0.55	0.55	0.55
query11	0.16	0.10	0.10
query12	0.15	0.11	0.11
query13	0.60	0.59	0.60
query14	0.96	0.95	0.94
query15	0.79	0.76	0.78
query16	0.40	0.39	0.39
query17	0.99	1.06	1.05
query18	0.22	0.21	0.21
query19	2.03	1.89	1.85
query20	0.02	0.02	0.02
query21	15.44	0.26	0.14
query22	5.09	0.05	0.04
query23	15.85	0.29	0.10
query24	2.13	0.23	0.80
query25	0.08	0.07	0.05
query26	0.14	0.14	0.13
query27	0.08	0.06	0.05
query28	4.82	1.07	0.88
query29	12.53	3.93	3.16
query30	0.28	0.15	0.12
query31	2.82	0.64	0.39
query32	3.24	0.55	0.47
query33	3.01	3.02	3.07
query34	16.25	5.10	4.45
query35	4.54	4.57	4.43
query36	0.65	0.49	0.49
query37	0.13	0.08	0.07
query38	0.08	0.04	0.04
query39	0.06	0.02	0.03
query40	0.18	0.14	0.14
query41	0.10	0.03	0.03
query42	0.06	0.03	0.03
query43	0.04	0.04	0.03
Total cold run time: 98.63 s
Total hot run time: 26.8 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 16.54% (21/127) 🎉
Increment coverage report
Complete coverage report

Use 'can only support' format instead of 'requires' to match
existing test expectations in test_flexible_partial_update_restricts.groovy
@dataroaring
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17643	4194	4025	4025
q2	2095	344	271	271
q3	10081	1247	734	734
q4	10225	872	312	312
q5	7528	2113	1801	1801
q6	188	171	141	141
q7	919	779	668	668
q8	9280	1375	1146	1146
q9	4812	4605	4453	4453
q10	6718	1772	1384	1384
q11	532	306	285	285
q12	710	751	571	571
q13	17768	3832	3027	3027
q14	291	294	277	277
q15	573	509	509	509
q16	678	695	640	640
q17	632	829	469	469
q18	6527	6399	6844	6399
q19	907	1077	644	644
q20	443	410	278	278
q21	3156	2553	2486	2486
q22	1147	1100	1056	1056
Total cold run time: 102853 ms
Total hot run time: 31576 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4342	4337	4220	4220
q2	322	400	322	322
q3	2301	2923	2322	2322
q4	1411	1889	1418	1418
q5	4698	4302	4357	4302
q6	220	166	128	128
q7	1988	1896	1774	1774
q8	2572	2381	2334	2334
q9	7342	7067	7290	7067
q10	2426	2657	2351	2351
q11	566	488	463	463
q12	730	792	642	642
q13	3701	4051	3283	3283
q14	294	296	287	287
q15	543	495	501	495
q16	664	695	610	610
q17	1077	1213	1250	1213
q18	7690	7285	7232	7232
q19	811	794	785	785
q20	1870	1949	1843	1843
q21	4425	4200	4096	4096
q22	1074	1021	957	957
Total cold run time: 51067 ms
Total hot run time: 48144 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 173538 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 b90147e01103ab581dbe2b2e5d8b45602ecbcf6c, data reload: false

query5	4376	636	477	477
query6	341	255	221	221
query7	4230	466	262	262
query8	358	256	269	256
query9	8698	2848	2897	2848
query10	487	385	327	327
query11	15134	14997	14918	14918
query12	169	118	115	115
query13	1259	480	382	382
query14	5811	3044	2776	2776
query14_1	2671	2644	2668	2644
query15	206	192	182	182
query16	1019	484	470	470
query17	1137	644	530	530
query18	2422	416	323	323
query19	215	216	192	192
query20	117	110	117	110
query21	208	136	117	117
query22	3771	4249	4039	4039
query23	15997	15588	15238	15238
query23_1	15583	15448	15456	15448
query24	7143	1530	1150	1150
query24_1	1157	1168	1159	1159
query25	517	435	381	381
query26	1234	256	147	147
query27	2789	441	274	274
query28	4579	2119	2111	2111
query29	778	519	413	413
query30	313	238	220	220
query31	774	638	559	559
query32	81	82	80	80
query33	571	347	303	303
query34	923	871	525	525
query35	708	751	668	668
query36	902	921	825	825
query37	139	100	88	88
query38	2731	2702	2614	2614
query39	782	746	723	723
query39_1	700	705	720	705
query40	221	135	118	118
query41	65	64	65	64
query42	104	102	104	102
query43	447	448	423	423
query44	1297	733	725	725
query45	186	183	178	178
query46	829	942	572	572
query47	1462	1476	1296	1296
query48	314	322	240	240
query49	614	443	335	335
query50	607	268	203	203
query51	3778	3777	3727	3727
query52	105	112	95	95
query53	286	326	274	274
query54	296	271	286	271
query55	83	84	75	75
query56	333	314	320	314
query57	1087	1017	942	942
query58	268	264	260	260
query59	2031	2202	2013	2013
query60	340	324	305	305
query61	161	154	154	154
query62	382	353	321	321
query63	292	262	259	259
query64	5136	1295	996	996
query65	3875	3682	3781	3682
query66	1466	414	311	311
query67	15495	15834	15381	15381
query68	2414	1069	735	735
query69	445	363	323	323
query70	1007	937	921	921
query71	326	315	294	294
query72	5455	3213	3426	3213
query73	578	712	308	308
query74	8728	8882	8523	8523
query75	2746	2852	2486	2486
query76	2266	1065	645	645
query77	354	381	314	314
query78	9742	10067	9184	9184
query79	1078	926	580	580
query80	921	632	540	540
query81	511	264	235	235
query82	1342	149	116	116
query83	350	267	242	242
query84	265	121	103	103
query85	1122	658	472	472
query86	371	296	268	268
query87	2832	2892	2797	2797
query88	3472	2581	2549	2549
query89	399	343	329	329
query90	1778	178	170	170
query91	176	160	136	136
query92	75	78	70	70
query93	964	876	524	524
query94	561	332	301	301
query95	591	339	394	339
query96	640	503	229	229
query97	2331	2443	2357	2357
query98	221	201	198	198
query99	622	564	529	529
Total cold run time: 246587 ms
Total hot run time: 173538 ms

@doris-robot
Copy link

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

query1	0.06	0.05	0.05
query2	0.10	0.05	0.05
query3	0.27	0.09	0.08
query4	1.62	0.12	0.12
query5	0.28	0.26	0.25
query6	1.15	0.68	0.64
query7	0.02	0.02	0.02
query8	0.06	0.04	0.04
query9	0.57	0.52	0.49
query10	0.55	0.56	0.55
query11	0.15	0.10	0.10
query12	0.14	0.10	0.10
query13	0.59	0.58	0.58
query14	0.97	0.94	0.96
query15	0.80	0.77	0.78
query16	0.38	0.40	0.39
query17	1.07	1.02	1.06
query18	0.22	0.21	0.21
query19	1.86	1.82	1.89
query20	0.02	0.01	0.01
query21	15.43	0.26	0.14
query22	5.02	0.05	0.04
query23	15.95	0.28	0.10
query24	1.04	0.71	0.21
query25	0.10	0.06	0.05
query26	0.16	0.13	0.12
query27	0.06	0.08	0.05
query28	3.76	1.08	0.89
query29	12.50	3.93	3.15
query30	0.28	0.14	0.12
query31	2.81	0.64	0.39
query32	3.24	0.55	0.46
query33	3.01	2.98	3.01
query34	16.05	5.01	4.41
query35	4.42	4.47	4.44
query36	0.66	0.50	0.49
query37	0.11	0.07	0.06
query38	0.08	0.04	0.04
query39	0.04	0.03	0.03
query40	0.17	0.15	0.14
query41	0.10	0.03	0.03
query42	0.05	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 95.96 s
Total hot run time: 26.64 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 16.54% (21/127) 🎉
Increment coverage report
Complete coverage report

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.

4 participants