Repository navigation
Commit eba47e8
[fix](be) Fix BE UT compile error and Iceberg partition limit test crash
### 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.
### Release note
None
### Check List (For Author)
- Test: Unit Test
- run-be-ut.sh --run --filter='function_string_test.function_translate_mixed_const_map_test:DefaultAndConfiguredLimits/ExternalTableWriterPartitionLimitTest.*'
on master 57e41e9 plus this commit: doris_be_test compiles and all
5 tests pass (the translate case and the 2 Hive + 2 Iceberg partition
limit cases). The failures above are from TeamCity BE UT runs of other
PRs based on master (e.g. #68853, #69456).
- Behavior changed: No
- Does this need documentation: No
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 57e41e9 commit eba47e8
2 files changed
Lines changed: 19 additions & 7 deletions
File tree
- be/test
- exec/sink/writer
- exprs/function
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2967 | 2967 | | |
2968 | 2968 | | |
2969 | 2969 | | |
2970 | | - | |
2971 | | - | |
2972 | | - | |
| 2970 | + | |
| 2971 | + | |
| 2972 | + | |
| 2973 | + | |
| 2974 | + | |
2973 | 2975 | | |
2974 | 2976 | | |
2975 | 2977 | | |
| |||
2979 | 2981 | | |
2980 | 2982 | | |
2981 | 2983 | | |
2982 | | - | |
2983 | | - | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
2984 | 2988 | | |
2985 | 2989 | | |
2986 | | - | |
2987 | | - | |
| 2990 | + | |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
2988 | 2994 | | |
2989 | 2995 | | |
2990 | 2996 | | |
| |||
0 commit comments