Skip to content

[refactor](be) Strengthen enum type safety in execution and expressions - #69174

Merged
yiguolei merged 1 commit into
apache:masterfrom
Mryange:refine-be-enum-types
Oct 18, 2026
Merged

yiguolei merged 1 commit into
apache:masterfrom
Mryange:refine-be-enum-types

Conversation

@Mryange

@Mryange Mryange commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: N/A

Problem Summary:

Root cause: unscoped enums implicitly convert to integers, and integer parameters accept unrelated enum values, weakening compile-time type checking in BE execution and expressions.

Use scoped enums for tablet routing, function state scope, and geometry types/statuses. Replace integer Hash Join template parameters and runtime-filter/WKB interfaces with their actual enum types, and update source, test, grammar, and benchmark callers. Use constexpr constants for scalar-group indexes and remove an unused JSON enum. Existing encoded values and DateTime value types remain unchanged.

Release note

None

Check List (For Author)

  • Test:
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed in supported execution paths.
      • Previous test can cover this change.
    • Validation: clang-format 16, git diff --check, and build-support/check-build-hygiene.sh passed. BE compilation, unit tests, regression tests, and clang-tidy have not been run locally.
  • Behavior changed:
    • No.
  • Does this need documentation?
    • No.

Check List (For Reviewer who merge this PR)

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

@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 16, 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.

Static review of PR #69174 at f98de0c covered all 104 changed paths (66 source files, 34 tests, 4 benchmarks), callers and parallel paths. No actionable defect was found. No existing inline threads or additional user focus were supplied.

Critical checkpoint conclusions:

  1. Goal and proof: scoped enums, typed join/runtime-filter/WKB interfaces, and constexpr scalar indices implement the stated type-safety refactor. Existing tests were adapted; runtime equivalence has not been established by execution.
  2. Scope and clarity: changes remain focused on enum types and consumers; benchmark formatting does not change logic.
  3. Concurrency: fragment sharing, thread-local state, operator scheduling, locks, and callbacks retain their existing behavior; no new concurrency mechanism.
  4. Lifecycle/static initialization: original and cloned expression contexts retain open/close scope pairing and shared fragment ownership. New constants are constexpr; no new dynamic global initialization or ownership cycle.
  5. Configuration: none added or modified.
  6. Compatibility: geometry tags, WKB byte order/type codes, and parse-status numbers are unchanged, with numeric conversion at existing encoding boundaries. Changed C++ interfaces and template declarations/instantiations agree. No new libc dependency or serialized layout.
  7. Thrift/protobuf: no definitions or field IDs changed; existing TJoinOp/PFilterType enums are reused.
  8. Parallel paths: checked source/test/benchmark callers, normal and ASOF join dispatch/instantiations, tablet modes, and v1/v2 expression paths; no missed migration found.
  9. Conditions/errors: qualified comparisons preserve their predicates. The new minMemSize default rejects types absent from its two supported line/polygon callers; WKT parser success remains integer zero and unknown runtime-filter handling remains unchanged.
  10. Test coverage: existing function, geometry/endian/malformed-input, scan, and routing cases retain their expected behavior. BE compilation, unit/regression tests, and clang-tidy were not run.
  11. Test results: no golden files changed; test expectations change only enum qualification.
  12. Observability: no new execution behavior needs counters; existing profiles and error paths remain, including explicit integer formatting of an unknown function scope.
  13. Transactions/persistence: no transaction, EditLog, visibility/version, rowset, or delete-bitmap protocol changes.
  14. Writes/atomicity: tablet routing enumerator values and selection behavior are preserved; no new write/recovery or atomicity behavior.
  15. FE/BE variables: no added transmitted variable or sending path.
  16. Performance/memory: no changed runtime algorithm, per-row allocation, column copy, nullable shape, or ownership behavior. The PlanNodes header supplies the nested enum needed by the typed friend declaration; static header hygiene passes. No runtime benchmark or completed-ELF compatibility claim.
  17. Other risks: independent review covers numeric/serialization boundaries and residual callers; final risk dispositions and convergence are recorded in the shared ledger.

Validation: build-support/check-build-hygiene.sh passed as a pure-text static gate (header layering/budgets/PCH, extern-template pairing, unity-skip coverage). No builds or runtime tests were attempted. The review's testing limitation is the absence of compilation and execution evidence.

Review converged in round 1. All three reviewers returned NO_NEW_VALUABLE_FINDINGS; both initial risk focuses were dismissed with concrete evidence and independently checked. No unresolved candidate or uncovered changed-file scope remains.

Review converged after 1 round(s).

### What problem does this PR solve?

Issue Number: N/A

Problem Summary: Unscoped enums and integer interfaces weaken compile-time type checking. Use scoped enums for tablet routing, function state scope and geometry, type Hash Join template parameters and runtime-filter/WKB interfaces, and update callers. Preserve encoded values and leave DateTime value types unchanged.

### Release note

None

### Check List (For Author)

- Test: No need to test (type-safety refactoring covered by existing tests); clang-format 16, git diff --check and build hygiene passed. Compilation, unit tests, regression tests and clang-tidy were not run.
- Behavior changed: No
- Does this need documentation: No
@Mryange
Mryange force-pushed the refine-be-enum-types branch from f98de0c to 8342f80 Compare October 16, 2026 06:53
@Mryange

Mryange commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17624	5595	5558	5558
q2	2113	327	258	258
q3	10213	1407	842	842
q4	4681	472	341	341
q5	7451	800	542	542
q6	193	193	158	158
q7	783	794	600	600
q8	9256	1384	1093	1093
q9	5787	4285	4282	4282
q10	6834	1301	1027	1027
q11	427	257	232	232
q12	642	394	301	301
q13	18080	3605	3048	3048
q14	275	275	250	250
q15	q16	735	736	664	664
q17	1183	763	576	576
q18	7055	6246	6182	6182
q19	1105	958	597	597
q20	380	333	233	233
q21	5427	2526	2590	2526
q22	405	350	283	283
Total cold run time: 100649 ms
Total hot run time: 29593 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	6539	6530	6566	6530
q2	728	627	587	587
q3	5568	5725	5344	5344
q4	2113	2166	1575	1575
q5	5857	5730	5553	5553
q6	264	221	164	164
q7	2280	2026	1855	1855
q8	3157	2754	2782	2754
q9	8173	7955	7630	7630
q10	3660	3599	3198	3198
q11	596	409	381	381
q12	650	692	504	504
q13	3257	3610	3075	3075
q14	283	290	260	260
q15	q16	657	677	612	612
q17	7852	7058	6872	6872
q18	13195	12320	13194	12320
q19	937	811	803	803
q20	2198	2168	1954	1954
q21	5835	4888	4839	4839
q22	516	464	416	416
Total cold run time: 74315 ms
Total hot run time: 67226 ms

@hello-stephen

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

query5	4324	585	460	460
query6	434	207	192	192
query7	4795	445	232	232
query8	342	165	148	148
query9	8781	3943	4036	3943
query10	457	320	262	262
query11	6036	3833	3508	3508
query12	150	101	91	91
query13	1262	454	341	341
query14	6146	4142	3798	3798
query14_1	3491	3531	3519	3519
query15	209	198	182	182
query16	946	444	427	427
query17	843	663	543	543
query18	2426	425	319	319
query19	200	174	151	151
query20	89	85	83	83
query21	213	139	112	112
query22	13031	13001	12836	12836
query23	13501	12863	12490	12490
query23_1	12728	12553	12544	12544
query24	7091	823	469	469
query24_1	468	472	465	465
query25	533	427	362	362
query26	1284	255	141	141
query27	2779	440	272	272
query28	4603	1950	1963	1950
query29	1579	605	453	453
query30	301	220	177	177
query31	1011	921	847	847
query32	147	96	96	96
query33	551	305	252	252
query34	904	853	500	500
query35	752	761	642	642
query36	841	817	729	729
query37	133	108	96	96
query38	1791	1778	1698	1698
query39	793	826	753	753
query39_1	742	729	743	729
query40	225	115	98	98
query41	71	67	69	67
query42	84	85	84	84
query43	381	386	327	327
query44	1297	700	698	698
query45	186	198	164	164
query46	845	971	572	572
query47	2991	3052	2950	2950
query48	290	305	223	223
query49	572	412	294	294
query50	679	271	208	208
query51	10536	10684	10359	10359
query52	79	80	67	67
query53	190	207	150	150
query54	241	193	177	177
query55	71	67	60	60
query56	243	227	203	203
query57	1613	1631	1556	1556
query58	281	256	256	256
query59	2147	2183	2014	2014
query60	291	282	227	227
query61	142	149	148	148
query62	388	344	286	286
query63	194	168	159	159
query64	2718	957	772	772
query65	3282	3247	3222	3222
query66	1787	420	312	312
query67	20132	20226	19820	19820
query68	3050	1006	607	607
query69	380	297	248	248
query70	853	785	804	785
query71	308	238	208	208
query72	2691	2580	2319	2319
query73	522	517	295	295
query74	4609	4457	4320	4320
query75	2313	2308	1944	1944
query76	2298	1006	600	600
query77	336	361	298	298
query78	9835	9889	9186	9186
query79	951	861	533	533
query80	1439	435	344	344
query81	600	327	277	277
query82	617	137	108	108
query83	280	201	179	179
query84	310	121	103	103
query85	1102	435	389	389
query86	429	243	225	225
query87	2035	1961	1802	1802
query88	3619	2700	2675	2675
query89	339	300	262	262
query90	1805	184	186	184
query91	164	153	128	128
query92	102	92	89	89
query93	1028	1010	595	595
query94	629	301	254	254
query95	599	345	377	345
query96	658	521	232	232
query97	2490	2431	2361	2361
query98	170	150	144	144
query99	780	778	665	665
Total cold run time: 235818 ms
Total hot run time: 152308 ms

@hello-stephen

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

query1	0.01	0.00	0.01
query2	0.09	0.05	0.06
query3	0.27	0.12	0.12
query4	1.60	0.12	0.12
query5	0.24	0.25	0.26
query6	1.18	0.68	0.70
query7	0.04	0.01	0.01
query8	0.05	0.04	0.04
query9	0.41	0.36	0.35
query10	0.59	0.57	0.62
query11	0.21	0.14	0.14
query12	0.19	0.15	0.14
query13	0.49	0.49	0.48
query14	1.03	1.01	1.03
query15	0.64	0.62	0.61
query16	0.35	0.36	0.35
query17	1.13	1.15	1.11
query18	0.23	0.21	0.21
query19	2.14	2.02	2.07
query20	0.02	0.02	0.01
query21	15.48	0.26	0.15
query22	4.39	0.06	0.05
query23	16.26	0.33	0.12
query24	3.23	0.74	0.45
query25	0.15	0.06	0.05
query26	1.56	0.27	0.15
query27	0.04	0.04	0.04
query28	1.67	0.66	0.40
query29	12.59	4.29	3.34
query30	0.28	0.15	0.14
query31	2.77	0.57	0.34
query32	3.22	0.63	0.51
query33	3.16	3.19	3.33
query34	15.40	4.03	3.38
query35	3.35	3.35	3.35
query36	0.55	0.42	0.48
query37	0.10	0.07	0.07
query38	0.04	0.04	0.03
query39	0.04	0.03	0.03
query40	0.17	0.15	0.14
query41	0.09	0.03	0.03
query42	0.04	0.03	0.03
query43	0.05	0.03	0.03
Total cold run time: 95.54 s
Total hot run time: 24.71 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 64.71% (22/34) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 66.34% (31684/47760)
Line Coverage 51.07% (333519/653006)
Region Coverage 46.44% (269519/580388)
Branch Coverage 48.14% (126850/263526)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 70.59% (24/34) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 77.20% (35729/46284)
Line Coverage 62.33% (402703/646033)
Region Coverage 58.71% (339521/578310)
Branch Coverage 59.67% (156878/262891)

@csun5285

Copy link
Copy Markdown
Contributor

/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 104 changed paths at 8342f80. No actionable defect introduced by this refactor was identified. Existing inline threads are empty, so there are no duplicate findings or existing blocking comment IDs. The user supplied no additional focus points.

Critical checkpoint conclusions:

Checkpoint Conclusion
Goal and proof Scoped enums and typed interfaces strengthen source checking. Static comparison preserves supported enum values and behavior; existing tests are migrated, but no new behavior test is added.
Scope and clarity Changes are focused on enum typing and callers, constant indexes, and removing an unused JSON enum. All 104 paths were read; 84 contain only expected qualifications/template changes or whitespace, with 20 boundary files checked separately.
Concurrency and locks No threads, lock acquisition/order, shared-state mutations, atomics, or critical-section work change. Fragment state sharing and thread state isolation remain intact.
Lifecycle and initialization Original contexts still open fragment and thread scopes; clones inherit fragment state and open thread scope. Close symmetry and ownership are preserved. No cross-translation-unit initialization dependency is introduced.
Configuration No configuration items or dynamic configuration behavior change.
Compatibility Geometry type/status numbers, internal encoded headers, WKB type/endian bytes, and DateTime value types are preserved. Typed join/filter APIs are internal source changes; no persisted layout or mixed-version protocol change was found.
Thrift and protobuf No gensrc definitions, field IDs, enum wire values, or optionality change.
Parallel paths Checked hash build/probe/ASOF/mark joins, declarations/friends/instantiations, both tablet writers and partitioner, function/UDF and benchmark callers, WKT/WKB, format-v2 cast/delete and storage LIKE users. No stale consumers found.
Conditions and errors Existing success/error comparisons retain their values. WKT checks the parser's integer success value 0. WKB minMemSize's added default cannot affect its only two call types, line and polygon. Existing numeric malformed-input sentinels are unchanged.
Test coverage Unit tests and benchmark callers retain their original inputs and expectations; geometry tests include both endiannesses, invalid order/types, SRID and truncation. No tests or builds were run for this review.
Expected results No regression output files or expected SQL results change. Updated unit-test expectations refer to the same enum values.
Observability Existing timers, metrics and error propagation remain; the function-scope diagnostic explicitly converts the enum to int. No new execution path requires additional instrumentation.
Transactions and persistence No EditLog, commit/publish, failover, rowset version, or delete-bitmap protocol change.
Writes and atomicity Tablet routing choices and write operations are unchanged; no transaction or crash-recovery behavior changes.
FE/BE propagation No new transmitted variables or FE/BE sending paths are introduced. Existing TJoinOp and PFilterType values are preserved.
Performance and memory No row-loop work, allocation, copying, COW/null handling, I/O, or algorithm complexity changes. The new PlanNodes dependency in column_vector.h passed the static header gates; no runtime performance claim was made.
Other checks Header layering/budgets, PCH whitelist, extern-template pairing and test source/unity coverage pass the repository's pure-text build-hygiene script. No further introduced issue was found.

Validation limits: this was a static review. No compilation, unit/regression execution, clang-tidy, final ELF/glibc audit, or performance measurement was performed. GitHub statuses on this SHA report COMPILE, BE UT and regressions successful, with the coverage-merge check failing; those logs were not inspected and these statuses are not independent runtime validation by this review.

Convergence: converged in round 1. Both normal reviewers and the separate risk reviewer returned NO_NEW_VALUABLE_FINDINGS on the same empty inline set. All changed paths, candidates and risk foci are accounted for; no unresolved changed-code candidate or coverage gap remains.

Review converged after 1 round(s).

@yiguolei
yiguolei merged commit fd9f65d into apache:master Oct 18, 2026
36 of 37 checks passed
OIiveirra added a commit to OIiveirra/doris that referenced this pull request Oct 19, 2026
### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#69032

Problem Summary: Official upstream/master 01e735b contains the scoped-enum migration from apache#69174. Its geometry/status/WKB changes conflict with this branch's typed constructors, byte-oriented parser and regression coverage. Merge the official branch while preserving both parents' behavior. Qualify the spatial enum values, explicitly convert wire-byte and WKB integer boundaries, retain the new metadata error status, and use an equivalent boolean assertion for a shape enum without an ostream overload. Preserve upstream Iceberg table-property operations and the spatial schema checks; Connector API remains 19.0.

### Release note

None

### Check List (For Author)

- Test: Unit Test / Manual test
    - Standard ASAN/clang21 BE UT: WkbParseTest, VGeoFunctionsTest and GeoTypesTest.
    - Standard FE UT: Iceberg DDL/catalog operations, column evolution, spatial write validation and the complete Connector SPI suite.
    - clang-format16, header hygiene, source whitespace check and Standards/Spec self-review.
    - Full-file clang-tidy reports 45 existing-line diagnostics; all map to unchanged HEAD lines and no modified-line diagnostics are present. No unrelated refactoring or NOLINT additions.
- Behavior changed: No manual feature changes; inherit official master and preserve typed/legacy parsing semantics.
- Does this need documentation: No; the two new review requests are analyzed separately and remain unimplemented.
morningman added a commit that referenced this pull request Oct 19, 2026
…enum class (#69297)

### What problem does this PR solve?

Issue Number: None

Related PR: #69018, #69174

Problem Summary:

**In short.** BE UT fails with `BE BUILD FAIL` for every PR against
master: `be/test/exprs/function/function_h3_test.cpp`, added by #69018,
no longer compiles since #69174 made
`FunctionContext::FunctionStateScope` an `enum class`. This PR spells
the 8 affected calls with the scoped enumerators, so the test compiles
again. Nothing else changes.

**Background.** #69174 (merged 2026-10-18) turned
`FunctionContext::FunctionStateScope` into an `enum class` and rewrote
every caller from `FunctionContext::FRAGMENT_LOCAL` to
`FunctionContext::FunctionStateScope::FRAGMENT_LOCAL`, and the same for
`THREAD_LOCAL`. #69018 (merged 2026-10-19) added an H3 function test
written against the old, unscoped names. The two PRs were merged
independently; together they leave a test on master that does not
compile. The BE UT pipeline merges each PR into the latest master before
it builds `doris_be_test`, so the break hits every PR, whatever it
changes.

**The problem, and what it cost.** Since #69261 fixed the other test
break of the day (left by #68447), every BE UT build for a PR against
master stops at this file, for example [build
1073803](http://43.132.222.7:8111/viewLog.html?buildId=1073803) (#69257,
merged into master `41a58afba2e`):

```
FAILED: [code=1] test/CMakeFiles/doris_be_test.dir/exprs/function/function_h3_test.cpp.o
../test/exprs/function/function_h3_test.cpp:66:62: error: no member named 'FRAGMENT_LOCAL' in 'doris::FunctionContext'
../test/exprs/function/function_h3_test.cpp:67:62: error: no member named 'THREAD_LOCAL' in 'doris::FunctionContext'
...
8 errors generated.
ninja: build stopped: subcommand failed.
```

No BE unit test runs for those PRs, so their BE UT result says nothing
about the PR until this is fixed.

**How this PR fixes it.** The 8 `open` / `close` calls in
`function_h3_test.cpp` now use
`FunctionContext::FunctionStateScope::FRAGMENT_LOCAL` / `THREAD_LOCAL`,
as #69174 did for the other function tests. The test logic is unchanged.

**Results.** `-fsyntax-only` with the flags of each file's own entry in
`be/ut_build_ASAN/compile_commands.json` (clang 22, `-DBE_TEST`):

| File | master `41a58afba2e` | this PR |
|---|---|---|
| `function_h3_test.cpp` | the 8 errors CI reports | compiles |
| the 4 test files #69261 fixed (`data_type_serde_arrow_test.cpp`,
`data_type_variant_v2_serde_jsonb_test.cpp`,
`variant_v2_execution_test.cpp`, `vparquet_writer_test.cpp`) | compile |
compile (not touched) |
| `function_array_zip_test.cpp` (baseline, not touched) | compiles |
compiles |
Mryange added a commit to Mryange/doris that referenced this pull request Oct 21, 2026
Issue Number: N/A

Related PR: apache#69174

Problem Summary: Use scoped enums and typed fields for storage states,
character categories, compaction triggers, and binlog operations to prevent
implicit integer conversions and mixing unrelated values. Preserve persisted
values and Cloud source compatibility; adapt callers and existing tests.

None

- Test: ASAN BE build, header hygiene, and diff whitespace checks passed.
  Existing unit tests were adapted but not run.
- Behavior changed: No
- Does this need documentation: No
yiguolei pushed a commit that referenced this pull request Oct 22, 2026
### What problem does this PR solve?

Issue Number: N/A

Related PR: #69174

Problem Summary:

Unscoped enums and integer fields used for storage states, character
categories, compaction triggers, and binlog operations allow unintended
implicit conversions and mixing unrelated values. Use scoped enums
throughout these paths, store enum values in typed fields and
containers, and convert explicitly at serialization, indexing, and
logging boundaries. Replace anonymous size enums with constexpr
constants and the IK dictionary's binary node state with a bool.

Persisted numeric values and storage formats remain unchanged. Keep
compatibility constants and compaction-type stream output so Cloud
source and tests do not need changes.

### Release note

None

### Check List (For Author)

- Test
    - [ ] Regression test
    - [ ] Unit Test
- [x] Manual test: `BUILD_TYPE=ASAN bash ./build.sh --be -j48` passed.
Header hygiene and diff whitespace checks passed. Existing unit tests
were adapted but not run.
    - [x] No need to test or manual test. Explain why:
- [x] This is a refactor/code format and no logic has been changed.
- Behavior changed:
    - [x] No.
    - [ ] Yes.
- Does this need documentation?
    - [x] No.
    - [ ] Yes.

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

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
csun5285 added a commit that referenced this pull request Oct 23, 2026
…ash (#69487)

### What problem does this PR solve?

Issue Number: None

Related PR: #69223, #69174, #69327, #69183

Problem Summary:

BE UT of every PR based on master fails since 2026-10-22. Two test-only
breakages were merged by PRs whose own CI ran on an older master.

1. doris_be_test does not compile (TeamCity: "BE BUILD FAIL"):

be/test/exprs/function/function_string_test.cpp:2971: error: no matching
conversion for functional-style cast from 'std::string' to 'Field'
be/test/exprs/function/function_string_test.cpp:2982: error: no member
       named 'FRAGMENT_LOCAL' in 'doris::FunctionContext'

function_translate_mixed_const_map_test, added by #69223, builds a Field
   directly from std::string and uses FunctionContext::FRAGMENT_LOCAL.
Field must be created with Field::create_field<TYPE_STRING>() now, and
#69174 made FunctionStateScope an enum class. Use both current
spellings,
   as the rest of be/test does.

2. Once it compiles, doris_be_test aborts (TeamCity: "CORE DUMPED") in
DefaultAndConfiguredLimits/ExternalTableWriterPartitionLimitTest.
IcebergRejectsNextPartitionBeforeOpeningAFile/0:

       shared_ptr_base.h:1344: [_Tp = doris::iceberg::Schema]:
       Assertion '__p != nullptr' failed.

#69327 made VIcebergTableWriter validate every block against the schema
pinned by open(): `iceberg::validate_write_block(*_schema, ...)`. The
test added by #69183 skips open() and calls write_prepared_block()
directly, so _schema is null. open() always sets _schema in production,
so the writer stays unchanged. The test now pins a one-field schema that
matches its block (optional INT "p", the source field of its identity
partition), as viceberg_table_writer_test.cpp does.

Co-authored-by: csun5285 <pianxian2@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants