Skip to content

[refine](column) Normalize constant expression results - #69679

Merged
Mryange merged 2 commits into
apache:masterfrom
Mryange:normalize-cached-constant-columns
Oct 29, 2026
Merged

Mryange merged 2 commits into
apache:masterfrom
Mryange:normalize-cached-constant-columns

Conversation

@Mryange

@Mryange Mryange commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: N/A

Related PR: #66614

Problem Summary:

Root cause: expression constness does not guarantee a physical ColumnConst. Cached constant expressions can return either a const wrapper or a single-row data column, while scan consumers sometimes cast the result directly to ColumnConst.

Store an owned single-row data column in ConstantExprResult, unwrap ColumnConst without copying, and expose read-only accessors. Migrate scan, scalar-function, and ANN consumers, and recreate ColumnConst when broadcasting the cached value. Preserve current function initialization and NULL handling.

Release note

Handle constant expressions that return ordinary single-row columns consistently in scan predicate processing.

Check List (For Author)

  • Test:
    • ASAN BE UT build passed. Ran 276 tests across 16 affected suites: 275 passed and the existing MathFunctionTest.random_test was skipped. Coverage includes zero-copy normalization, nullable values and ownership, arrays with nested NULLs, invalid multi-row input, broadcasting, scan predicates, function constant arguments, and ANN extraction.
    • clang-format 16, git diff --check, and BE build hygiene checks passed.
    • clang-tidy checked all 43 modified C++ files. New diagnostics were fixed and rechecked; existing complexity diagnostics remain on unchanged lines in column and LIKE tests.
  • Behavior changed: Yes. Scan consumers accept cached single-row constants regardless of their original physical representation; malformed multi-row cache inputs fail at construction.
  • Does this need documentation: No. No SQL syntax, configuration, or serialization changes.

Check List (For Reviewer who merge this PR)

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

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#66614

Problem Summary: Constant expressions may return ColumnConst or an ordinary single-row column, while scan consumers assume a const wrapper. Replace ColumnPtrWrapper with ConstantExprResult, normalize the result without copying, and migrate consumers to read-only accessors. Wrap the data column only when broadcasting.

### Release note

Handle constant expressions returning ordinary single-row columns consistently in scan predicate processing.

### Check List (For Author)

- Test: ASAN BE UT build passed; 275 tests passed and 1 existing test skipped across 16 suites. Formatting, build hygiene, and changed-line clang-tidy checks passed; existing complexity diagnostics remain on unchanged test code.
- Behavior changed: Yes. Normalize constant expression results and enforce the single-row invariant.
- 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?

@Mryange

Mryange commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@Mryange

Mryange commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot 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.

Reviewed all 43 changed files at head 9f5b362. One new P1 wrong-results finding requires changes: enabling function pushdown can make a newly accepted plain NULL LIKE pattern match empty-string rows. No existing inline findings require retention. No additional user focus was supplied.

Critical checkpoint conclusions:

  • Goal and correctness: normalizing cached constants to an owned single-row datum fixes the physical ColumnConst assumption; the new LIKE admission still needs the NULL safeguard described inline. Transaction visibility, version and delete-bitmap rules are unaffected.
  • Scope and abstraction: focused representation refactor; consumers consistently use ConstantExprResult and no stale ColumnPtrWrapper use remains.
  • Concurrency and locks: constants initialize during fragment open before thread-context clones share them. Access is read-only; no new shared mutation, locks, lock-order change or heavy locked work was found.
  • Lifecycle and initialization: intrusive column ownership survives outer-wrapper release, clones retain the cache, and pushed scan contexts retain StringRef backing storage. Broadcasting constructs a new outer ColumnConst. No new ownership cycle or cross-translation-unit static initialization dependency was found.
  • Configuration: no new setting; the finding requires existing enable_function_pushdown=true. Its default is false. The source-traced JSON/Coalesce example can reach BE with the default enable_fold_constant_by_be=false.
  • Compatibility: internal C++ callers are migrated; function names, SQL return types, FE/BE protocol and persisted formats are unchanged. No new platform-library dependency was found in the diff; release ELF compatibility was not executed or audited.
  • Thrift/protobuf field IDs: no gensrc changes; the upgrade-ID checkpoint is not applicable.
  • Parallel paths: OLAP, file and mock scan reads, scalar function opens, collection IN, ANN extraction, test utilities and broadcasts were reviewed. File-scan partial acceptance is preserved. The OLAP LIKE path is the exception reported inline.
  • Conditional checks and error handling: the one-row check enforces the existing execute_column(...,1) contract; errors propagate through existing Status/exception boundaries. Plain nullable NULL LIKE patterns need an explicit disposition before storage-predicate creation.
  • Test coverage: inspected ownership/pointer identity, direct and wrapped values, nullable true/false/NULL, nested array NULLs, invalid multirow inputs, zero/one/many-row broadcast, scalar arguments and ANN cases. Missing coverage is a plain nullable NULL LIKE pattern with function pushdown and its query result; clone/concurrency behavior was traced in source rather than directly tested here.
  • Test results: changed expectations are consistent with the reviewed paths; no regression result artifacts were changed. The PR author's reported test runs were not independently reproduced.
  • Observability: existing invariant/status errors suffice for the representation change; no additional logging or metrics requirement was identified.
  • Transactions and persistence: no transaction, EditLog, replay or failover behavior is changed.
  • Writes and atomicity: no data-write or commit path is changed; the reported defect affects query filtering.
  • FE/BE variables: no new transmitted variable or sending path is introduced.
  • Performance: normalization retains the existing row without copying; broadcast stays O(1), and scalar accessor changes add no row-level materialization. No additional performance defect was substantiated.
  • Other issues and user concerns: both initial risks and all reviewer candidates have explicit dispositions; the duplicate NULL-LIKE candidate is represented by one inline finding. No additional user concern or unresolved code candidate remains.

Static source review only: no builds, tests, benchmarks or runtime SQL were executed; the inline example is inferred from the producer/consumer chain. Review converged in 2 rounds after complete coverage, independent verification, duplicate resolution and the final sweep.

Review converged after 2 round(s).

pdt = PushDownType::UNACCEPTABLE;
return Status::OK();
}
*constant_str = const_col_wrapper->column().get_data_at(0);

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.

[P1] Preserve NULL semantics for newly accepted plain LIKE patterns

With enable_function_pushdown=true, a constant coalesce(...) can return a plain ColumnNullable(String) containing NULL, which this path previously rejected. For example, on a duplicate-key table whose VARCHAR key k contains '', consider:

WHERE k LIKE coalesce(
  jsonb_extract_string(CAST('{}' AS JSON), '$.x'),
  jsonb_extract_string(CAST('{}' AS JSON), '$.y'))

The missing paths yield NULL, and VectorizedCoalesceExpr caches an ordinary nullable row. This read produces {nullptr, 0}, but accepting it builds a LikeColumnPredicate whose FunctionLike::construct_like_const_state treats it as an empty pattern and selects constant_equals_fn_scalar. The accepted key predicate also removes the residual LIKE expression, so the empty-key row passes although SQL NULL must reject every row. With the default FE-only constant folding, the JSON extraction is not folded away. Preserve expression fallback for a NULL pattern, or explicitly reject all rows, before admitting it to the storage filter; add a plain-null pattern case. This example is source-traced, not executed.

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#69679

Problem Summary: Normalizing constant expression results makes plain nullable NULL LIKE patterns eligible for storage pushdown. The storage predicate treats a NULL StringRef as an empty pattern, which can return incorrect rows for LIKE and NOT LIKE. Reject NULL patterns before creating a storage predicate so expression evaluation preserves SQL NULL semantics. Keep non-NULL empty patterns eligible for pushdown.

### Release note

Preserve NULL LIKE and NOT LIKE pattern semantics when function pushdown is enabled.

### Check List (For Author)

- Test: ASAN BE UT build and OlapScanLikeConstantPatternTest.* passed (3 tests). clang-format 16, git diff --check, and BE build hygiene passed.
- Behavior changed: Yes. NULL LIKE patterns retain expression evaluation instead of storage pushdown.
- Does this need documentation: No
@Mryange

Mryange commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

/review

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17594	5207	5057	5057
q2	2136	348	252	252
q3	10199	1393	813	813
q4	4677	465	341	341
q5	7438	808	527	527
q6	176	179	151	151
q7	751	806	611	611
q8	9257	1394	1105	1105
q9	5491	4199	4196	4196
q10	6832	1296	1036	1036
q11	438	253	235	235
q12	639	399	280	280
q13	18118	3630	3074	3074
q14	277	269	249	249
q15	q16	739	708	653	653
q17	1217	747	586	586
q18	7062	6193	6130	6130
q19	1239	957	626	626
q20	385	345	224	224
q21	6136	2419	2426	2419
q22	381	327	272	272
Total cold run time: 101182 ms
Total hot run time: 28837 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	5937	5890	6188	5890
q2	721	585	560	560
q3	5764	5773	5193	5193
q4	2024	2132	1758	1758
q5	5837	5797	5669	5669
q6	241	187	142	142
q7	2249	2036	1865	1865
q8	3000	2627	2635	2627
q9	8040	7756	7511	7511
q10	3638	3560	3140	3140
q11	585	413	377	377
q12	657	687	511	511
q13	3313	3565	3048	3048
q14	281	293	261	261
q15	q16	660	679	622	622
q17	7695	7096	6898	6898
q18	12969	12196	12972	12196
q19	911	805	771	771
q20	2138	2162	1921	1921
q21	5619	4596	4663	4596
q22	501	447	409	409
Total cold run time: 72780 ms
Total hot run time: 65965 ms

@github-actions github-actions Bot 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.

Static review of PR #69679 at 40dc0a19edecfa25508992c2ee1a3e98dd0dc397: no new actionable findings.

Existing P1 4387798062 is fixed at this head. OlapScanLocalState::_should_push_down_function_filter checks the normalized pattern's NULL bit before reading its bytes; rejection prevents storage-predicate creation and retains expression evaluation. The new tests cover plain/wrapped nullable patterns, empty and nonempty values, and nonempty payloads hidden by NULL. No existing blocking ID is carried forward and no duplicate comment is posted.

Critical checkpoint conclusions:

  • Goal: ConstantExprResult consistently stores one owning data row for plain and wrapped constants, and get_result_from_const broadcasts it for the requested batch size. The constructor, ownership, array/null, broadcast and scan tests cover these contracts in source; they were not executed.
  • Scope and clarity: the 44-file change is a focused producer/API/consumer migration with corresponding test and mock updates.
  • Concurrency and locks: original fragment initialization populates the cache before context cloning; clones retain shared owners and initialize thread-local state. No new shared mutation, thread entry, lock order or blocking operation was introduced.
  • Lifecycle and static initialization: the inner COW column remains owned after its outer wrapper is released; expression/context owners preserve borrowed string data and ANN values. No ownership cycle or new static initializer was identified.
  • Configuration: no configuration item or dynamic-update behavior changes.
  • Compatibility: the changed C++ interfaces are migrated together in this tree; no serialized block, storage format or wire protocol changes were found. No mixed-version decoding path is added.
  • Thrift/protobuf: no gensrc/thrift or gensrc/proto change.
  • Parallel paths: OLAP/file/mock scans, scalar and collection IN, string/regexp/date/JSON/dictionary functions, random seeds, ANN extraction and cached expression broadcasting use the normalized representation. No old ColumnPtrWrapper reference remains under be.
  • Conditional checks: the new NULL-pattern rejection has a concrete explanatory comment; the one-row constructor check matches the existing execute_column(count=1) validation. Ordinary NOT LIKE remains a generic expression through the scan's slot-child gate.
  • Test coverage: added tests exercise nullable true/false/NULL scan completion and dependency readiness, binary NULL extraction, LIKE fallback, owner lifetime, nested NULLs and zero/one/multiple-row broadcasts. The scan tests mock constant production; full SQL/coalesce behavior and concurrent execution remain source-traced rather than executed.
  • Expected results: no regression output file changes; the changed unit-test expectations agree with the traced one-row/NULL contracts.
  • Observability: this representation refactor adds no distributed operation requiring new metrics or logging; invariant failures retain explicit failure behavior.
  • Transactions and persistence: no EditLog, commit/replay, failover, version-visibility or delete-bitmap changes.
  • Data writes and atomicity: no write path, storage mutation or new crash-recovery behavior.
  • FE/BE variables: no new variable, function registration, argument/return type or sending path.
  • Performance and memory: normalization shares existing owning column storage without materialization or value copies, removes repeated wrapper dispatch/unpacking, and adds no large allocation or row-loop copy. Cache ownership continues through the existing COW allocation paths.
  • Errors and data correctness: scalar/Field/NULL reads preserve row-zero semantics; constant WHERE NULL/false still signals EOS and readiness; binary NULL and ANN validation retain their error/rejection paths. No distinct additional defect was verified.

Coverage: all 44 authoritative changed paths and the relevant producer/consumer/lifecycle chains were reviewed by the main reviewer, two complete-review scopes and a separate constant-boundary risk scope. The initial shape/ownership and NULL/pushdown risks were dismissed with source evidence; no unresolved candidate or static coverage gap remains. All assigned reviewers returned NO_NEW_VALUABLE_FINDINGS in round 1. Review converged after 1 round.

User focus: no additional focus was supplied. Validation was static inspection only: no builds, tests, benchmarks, formatting/link checks or runtime reproduction were run.

Review converged after 1 round(s).

@hello-stephen

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

query5	4329	581	427	427
query6	436	223	199	199
query7	4800	450	238	238
query8	318	182	174	174
query9	8770	3219	3229	3219
query10	481	326	268	268
query11	6034	3876	3564	3564
query12	147	91	85	85
query13	1249	447	327	327
query14	6148	3888	3640	3640
query14_1	3432	3397	3470	3397
query15	219	227	180	180
query16	943	427	402	402
query17	837	653	518	518
query18	2410	413	299	299
query19	193	172	131	131
query20	82	83	83	83
query21	203	127	102	102
query22	12946	13054	13003	13003
query23	13432	12762	12525	12525
query23_1	12563	12441	12502	12441
query24	7345	818	468	468
query24_1	467	477	499	477
query25	500	389	337	337
query26	1270	254	136	136
query27	2784	437	271	271
query28	4621	2035	2069	2035
query29	1526	578	426	426
query30	302	220	184	184
query31	1022	929	823	823
query32	147	96	91	91
query33	557	317	243	243
query34	895	855	503	503
query35	741	754	675	675
query36	823	844	710	710
query37	132	108	81	81
query38	1789	1731	1672	1672
query39	802	796	758	758
query39_1	742	731	735	731
query40	223	119	101	101
query41	71	69	73	69
query42	89	83	85	83
query43	346	366	311	311
query44	1328	706	721	706
query45	189	182	168	168
query46	826	969	573	573
query47	2873	2936	2880	2880
query48	310	310	231	231
query49	593	411	311	311
query50	683	275	226	226
query51	10536	10378	10342	10342
query52	82	82	77	77
query53	211	211	158	158
query54	262	209	191	191
query55	72	71	71	71
query56	255	245	238	238
query57	1674	1625	1561	1561
query58	300	288	277	277
query59	2206	2157	2020	2020
query60	320	256	225	225
query61	175	168	178	168
query62	403	334	292	292
query63	188	162	164	162
query64	2882	1072	782	782
query65	3366	3296	3293	3293
query66	1774	411	298	298
query67	20261	20250	20170	20170
query68	3267	989	621	621
query69	392	290	250	250
query70	828	780	786	780
query71	289	238	216	216
query72	2824	2663	2308	2308
query73	520	525	306	306
query74	4656	4495	4369	4369
query75	2316	2276	1915	1915
query76	2326	1015	602	602
query77	334	381	272	272
query78	10103	9850	9171	9171
query79	991	844	528	528
query80	1229	428	337	337
query81	584	327	275	275
query82	820	137	111	111
query83	293	193	195	193
query84	306	122	105	105
query85	867	419	370	370
query86	406	236	231	231
query87	2000	1987	1823	1823
query88	3798	2792	2777	2777
query89	342	276	241	241
query90	1937	172	167	167
query91	159	152	127	127
query92	101	77	92	77
query93	1046	1001	575	575
query94	642	309	282	282
query95	574	392	312	312
query96	684	484	239	239
query97	2483	2410	2294	2294
query98	162	153	148	148
query99	775	767	662	662
Total cold run time: 236819 ms
Total hot run time: 151860 ms

@hello-stephen

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

query1	0.00	0.00	0.00
query2	0.10	0.05	0.05
query3	0.26	0.09	0.08
query4	1.61	0.10	0.10
query5	0.25	0.26	0.25
query6	1.17	0.70	0.69
query7	0.03	0.01	0.00
query8	0.06	0.04	0.04
query9	0.42	0.36	0.36
query10	0.60	0.59	0.61
query11	0.20	0.14	0.14
query12	0.18	0.15	0.15
query13	0.49	0.49	0.49
query14	1.04	1.01	1.02
query15	0.63	0.60	0.62
query16	0.36	0.34	0.39
query17	1.19	1.17	1.18
query18	0.22	0.22	0.22
query19	2.10	2.00	2.01
query20	0.02	0.01	0.01
query21	15.48	0.20	0.16
query22	4.92	0.05	0.05
query23	16.26	0.34	0.13
query24	3.16	0.66	0.46
query25	0.11	0.07	0.06
query26	1.20	0.22	0.16
query27	0.05	0.03	0.03
query28	2.83	0.74	0.38
query29	12.50	4.12	3.24
query30	0.28	0.12	0.10
query31	2.77	0.58	0.34
query32	3.21	0.61	0.51
query33	3.26	3.18	3.28
query34	15.41	4.04	3.40
query35	3.35	3.34	3.32
query36	0.56	0.45	0.43
query37	0.09	0.06	0.06
query38	0.05	0.04	0.03
query39	0.04	0.02	0.03
query40	0.17	0.16	0.14
query41	0.08	0.03	0.03
query42	0.03	0.03	0.04
query43	0.04	0.04	0.03
Total cold run time: 96.78 s
Total hot run time: 24.58 s

@Mryange

Mryange commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17589	5165	5027	5027
q2	2147	306	256	256
q3	10217	1363	799	799
q4	4678	457	334	334
q5	7425	795	518	518
q6	180	182	148	148
q7	743	789	601	601
q8	9257	1281	1126	1126
q9	5435	4169	4157	4157
q10	6828	1279	1040	1040
q11	426	244	220	220
q12	647	397	273	273
q13	18097	3559	3028	3028
q14	269	266	243	243
q15	q16	720	722	697	697
q17	1162	730	575	575
q18	6957	6153	6115	6115
q19	1103	966	599	599
q20	372	336	223	223
q21	5086	2136	2278	2136
q22	345	299	251	251
Total cold run time: 99683 ms
Total hot run time: 28366 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	5595	5596	5587	5587
q2	691	560	542	542
q3	5208	5412	4939	4939
q4	2019	2131	1547	1547
q5	5273	5154	5452	5154
q6	262	209	156	156
q7	2348	2077	1847	1847
q8	3000	2679	2708	2679
q9	8101	7936	7937	7936
q10	3713	3866	3234	3234
q11	632	457	405	405
q12	694	695	531	531
q13	3584	3879	3248	3248
q14	335	331	312	312
q15	q16	718	705	674	674
q17	8276	7004	6878	6878
q18	12997	12176	12851	12176
q19	910	759	760	759
q20	2137	2162	1918	1918
q21	5630	4552	4747	4552
q22	498	457	420	420
Total cold run time: 72621 ms
Total hot run time: 65494 ms

@hello-stephen

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

query5	4327	589	460	460
query6	432	208	196	196
query7	4818	441	239	239
query8	326	189	158	158
query9	8796	3273	3286	3273
query10	499	318	264	264
query11	5926	3829	3573	3573
query12	158	92	87	87
query13	1253	437	319	319
query14	6120	3898	3685	3685
query14_1	3434	3447	3463	3447
query15	204	195	175	175
query16	927	433	397	397
query17	834	640	517	517
query18	2400	417	299	299
query19	197	176	130	130
query20	86	86	82	82
query21	210	129	105	105
query22	12925	13016	12846	12846
query23	13367	12824	12447	12447
query23_1	12504	12551	12532	12532
query24	7336	849	469	469
query24_1	491	474	478	474
query25	513	399	342	342
query26	1243	255	138	138
query27	2806	444	281	281
query28	5139	2063	2135	2063
query29	1559	590	471	471
query30	302	228	193	193
query31	1015	949	844	844
query32	155	110	95	95
query33	563	308	266	266
query34	898	885	549	549
query35	748	749	662	662
query36	814	793	713	713
query37	122	94	79	79
query38	1763	1744	1663	1663
query39	781	793	731	731
query39_1	731	731	735	731
query40	218	119	97	97
query41	70	66	66	66
query42	90	89	83	83
query43	344	361	311	311
query44	1388	711	723	711
query45	180	175	165	165
query46	838	957	585	585
query47	2788	2873	2916	2873
query48	301	310	224	224
query49	587	403	287	287
query50	691	293	212	212
query51	10290	10382	10245	10245
query52	80	82	77	77
query53	194	216	154	154
query54	249	202	186	186
query55	72	68	69	68
query56	249	214	223	214
query57	1660	1613	1552	1552
query58	297	268	257	257
query59	2192	2169	2018	2018
query60	313	247	230	230
query61	149	147	146	146
query62	387	333	285	285
query63	189	164	167	164
query64	2779	1059	907	907
query65	3333	3303	3279	3279
query66	1789	436	329	329
query67	20341	20134	20058	20058
query68	3002	1010	632	632
query69	399	307	276	276
query70	848	811	789	789
query71	313	248	230	230
query72	2809	2739	2503	2503
query73	510	532	301	301
query74	4630	4505	4369	4369
query75	2324	2299	1930	1930
query76	2325	1043	618	618
query77	354	364	277	277
query78	9690	9847	9178	9178
query79	1000	931	563	563
query80	758	433	364	364
query81	567	325	264	264
query82	574	140	106	106
query83	297	201	187	187
query84	304	125	103	103
query85	971	432	364	364
query86	363	236	233	233
query87	2003	1936	1827	1827
query88	3869	2847	2792	2792
query89	355	293	251	251
query90	1710	171	177	171
query91	162	193	129	129
query92	104	107	95	95
query93	1064	1030	596	596
query94	500	302	264	264
query95	589	400	306	306
query96	700	500	249	249
query97	2457	2430	2330	2330
query98	165	152	154	152
query99	758	762	637	637
Total cold run time: 235038 ms
Total hot run time: 152264 ms

@hello-stephen

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

query1	0.01	0.01	0.01
query2	0.09	0.05	0.05
query3	0.26	0.08	0.08
query4	1.61	0.11	0.10
query5	0.27	0.25	0.25
query6	1.17	0.69	0.67
query7	0.04	0.01	0.00
query8	0.06	0.03	0.04
query9	0.40	0.34	0.34
query10	0.63	0.60	0.63
query11	0.19	0.16	0.14
query12	0.19	0.15	0.15
query13	0.50	0.50	0.49
query14	1.02	1.01	1.01
query15	0.64	0.59	0.61
query16	0.36	0.35	0.34
query17	1.13	1.15	1.19
query18	0.21	0.20	0.20
query19	2.11	2.05	2.06
query20	0.02	0.02	0.01
query21	15.48	0.20	0.13
query22	4.78	0.06	0.06
query23	16.28	0.35	0.13
query24	2.88	0.60	0.44
query25	0.10	0.07	0.05
query26	1.47	0.21	0.15
query27	0.06	0.03	0.05
query28	3.70	0.77	0.36
query29	12.49	4.19	3.27
query30	0.29	0.13	0.11
query31	2.77	0.58	0.31
query32	3.22	0.60	0.53
query33	3.18	3.21	3.13
query34	15.38	3.97	3.34
query35	3.35	3.33	3.34
query36	0.56	0.48	0.45
query37	0.09	0.07	0.06
query38	0.05	0.04	0.04
query39	0.03	0.04	0.04
query40	0.17	0.14	0.13
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.03	0.03
Total cold run time: 97.4 s
Total hot run time: 24.44 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 93.75% (15/16) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 77.50% (36203/46711)
Line Coverage 62.74% (409234/652243)
Region Coverage 59.21% (346421/585034)
Branch Coverage 60.13% (160349/266683)

@eldenmoon eldenmoon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Mryange
Mryange merged commit 5b2c066 into apache:master Oct 29, 2026
37 checks passed
CalvinKirs added a commit to CalvinKirs/incubator-doris that referenced this pull request Oct 29, 2026
### What problem does this PR solve?

Related PR: apache#69679, apache#69257

Problem Summary: ConstantExprResult now owns its column behind accessors, but
HLL downsample still reads column_ptr as a field. This breaks the master BE
compile and performance builds at both optional argument reads. Pass column()
to the existing const IColumn parsing helpers.

### Release note

None

### Check List (For Author)

- Test: clang-format 16 passed; helper and accessor signatures checked.
  Full BE compilation will be verified by CI after pushing this fix.
- Behavior changed: No
- Does this need documentation: No
hello-stephen pushed a commit that referenced this pull request Oct 29, 2026
Related PR: #69257, #69679

Problem Summary: The constant-expression API migration in #69679 missed
two calls introduced by #69257, breaking the BE build. Call
`ConstantExprResult::column_ptr()` when reading the HLL downsample
constant arguments.
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