Uh oh!
There was an error while loading. Please reload this page.
fix: block type reset after dict filter - #63168
Conversation
hello-stephen
commented
May 12, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
yoock
commented
May 12, 2026
run buildall |
Gabriel39
commented
May 12, 2026
@yoock Please add regression test cases. |
本质上就是RowGroupReader::next_batch结束时必须调用_convert_dict_cols_to_string_cols(block);,但是这里漏了 |
Gabriel39
commented
May 13, 2026
/review |
There was a problem hiding this comment.
Reviewed the full PR diff and existing review context. I found one blocking issue in BE Parquet lazy-read error handling: the new call ignores a Status-returning conversion helper, which violates Doris error propagation rules and can also fail compilation because Status is [[nodiscard]].
Critical checkpoint conclusions:
- Goal/test: The PR appears intended to keep dictionary-filtered columns converted to string on an early EOF lazy-read path. The change is not safely implemented because conversion failures are not propagated; no new test is included for this edge path.
- Scope/clarity: The change is small and focused, but needs the same RETURN_IF_ERROR handling used by adjacent paths.
- Concurrency/lifecycle/config/compatibility: No new concurrency, lifecycle, config, persistence, storage-format, or FE-BE compatibility concerns found in this one-line change.
- Parallel paths: Neighboring no-row/filter-all paths already propagate _convert_dict_cols_to_string_cols errors; this new path should match them.
- Error handling: Blocking issue found; Status is ignored.
- Test coverage/results: No test or result changes were added. Given the fix is a direct error-propagation correction, existing coverage may be sufficient after updating the call, but this specific lazy EOF path is not newly covered.
- Observability/performance/memory: No additional observability, performance, or memory issues found.
- User focus: No additional user-provided review focus was specified.
| DCHECK_EQ(pre_read_rows + _cached_filtered_rows, 0); | ||
| *read_rows = 0; | ||
| *batch_eof = true; | ||
| _convert_dict_cols_to_string_cols(block); |
There was a problem hiding this comment.
This helper returns Status and Status is [[nodiscard]], so this call must be propagated. More importantly, if _get_block_column_pos() or convert_dict_column_to_string_column() fails, this path currently returns OK with the block left in the dictionary-code representation, unlike all adjacent _convert_dict_cols_to_string_cols call sites that use RETURN_IF_ERROR. Please keep the same error handling here.
| _convert_dict_cols_to_string_cols(block); | |
| RETURN_IF_ERROR(_convert_dict_cols_to_string_cols(block)); |
Gabriel39
commented
May 19, 2026
/review |
Gabriel39
commented
May 19, 2026
/run buildall |
Gabriel39
commented
May 19, 2026
run buildall |
hello-stephen
commented
May 19, 2026
TPC-H: Total hot run time: 30897 ms |
hello-stephen
commented
May 19, 2026
TPC-DS: Total hot run time: 169949 ms |
hello-stephen
commented
May 19, 2026
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
May 19, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Gabriel39
commented
May 20, 2026
/review |
Uh oh!
There was an error while loading. Please reload this page.
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
### What problem does this PR solve? Fix parquet reader reporting: Read parquet file xxxxx.parquet failed, reason = [INTERNAL_ERROR]comparison must input two same type column or column type is decimalv3/numeric, lhs=Int32, rhs=String --------- Co-authored-by: wanglong16 <wanglong16@xiaomi.com>
### What problem does this PR solve? Fix parquet reader reporting: Read parquet file xxxxx.parquet failed, reason = [INTERNAL_ERROR]comparison must input two same type column or column type is decimalv3/numeric, lhs=Int32, rhs=String --------- Co-authored-by: wanglong16 <wanglong16@xiaomi.com>
### What problem does this PR solve? Fix parquet reader reporting: Read parquet file xxxxx.parquet failed, reason = [INTERNAL_ERROR]comparison must input two same type column or column type is decimalv3/numeric, lhs=Int32, rhs=String --------- Co-authored-by: wanglong16 <wanglong16@xiaomi.com>
### What problem does this PR solve? Fix parquet reader reporting: Read parquet file xxxxx.parquet failed, reason = [INTERNAL_ERROR]comparison must input two same type column or column type is decimalv3/numeric, lhs=Int32, rhs=String --------- Co-authored-by: wanglong16 <wanglong16@xiaomi.com>
* [fix](be) Reset parquet dictionary columns on lazy-read EOF ### What problem does this PR solve? Issue Number: N/A Related PR: apache#63168 Problem Summary: When Parquet lazy materialization reaches EOF before creating a filter map, dictionary-filter columns remain Int32 in the returned block. Restore them to String before returning to prevent downstream bad casts and comparison failures. ### Release note Fix a BE crash caused by an incorrect Parquet dictionary-filter column type on the lazy-read EOF path. ### Check List (For Author) - Test: Static check - `./build-support/clang-format.sh` - `git diff --check` - BE UT was not run for this one-line semantic backport - Behavior changed: Yes. The Parquet reader now restores dictionary-filter columns to their logical String type before returning EOF. - Does this need documentation: No * [test](regression) Add parquet dict predicate lazy-read EOF case * [fix](regression) Align Parquet lazy-read fixture path ### What problem does this PR solve? Issue Number: None Related PR: #78 Problem Summary: The regression wrote the Parquet fixture under output/be/tmp while local() resolves relative paths under user_files_secure_path. Use /tmp consistently for OUTFILE, local(), and cleanup in the p0 regression environment. ### Release note None ### Check List (For Author) - Test: No need to test (static-only fix requested; git diff --check passed) - Behavior changed: No. Only the regression fixture path is aligned. - Does this need documentation: No
What problem does this PR solve?
修复读取parquet时,当上一个row group有dict filter时未将block的类型从Int32重置为String,导致报如下错误:
Read parquet file xxxxx.parquet failed, reason = [INTERNAL_ERROR]comparison must input two same type column or column type is decimalv3/numeric, lhs=Int32, rhs=String
在有些情况下会触发如下代码导致be core: