You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "jacktengg (via GitHub)" <gi...@apache.org> on 2026/04/16 14:11:07 UTC
[PR] [fix](be) Fix column/type nullability mismatch at VExpr output boundary and additional expression paths [doris]
jacktengg opened a new pull request, #62566:
URL: https://github.com/apache/doris/pull/62566
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: Follows up on commit 0ddcc4b72a0 which fixed the INPUT-side nullable mismatch
Problem Summary:
Commit 0ddcc4b72a0 fixed nullable column/type mismatch at the **INPUT side** (temp_blocks for `_function->execute()`) in 7 VExpr subclasses. However, the same mismatch pattern exists at the **OUTPUT side** and in additional expression paths:
1. **VExpr::execute() base class** (vexpr.h): Inserts `{execute_column(), execute_type(), expr_name()}` into the caller block without reconciling nullability. When `execute_column()` returns a nullable column but `execute_type()` returns a non-nullable type, `check_type_and_column_match()` fails.
2. **VExprContext methods** (vexpr_context.cpp): Four methods combine `execute_column()` + `execute_type()` without reconciliation:
- `execute(block, result_data)` — used by repeat_operator, union_sink
- `execute_const_expr()` — used by fold_constant_executor, json_reader
- `filter_block()` — used for WHERE clause evaluation
- `get_output_block_after_execute_exprs()` — used for output projections
3. **varray_sort_function.cpp**: `assert_cast<DataTypeNullable*>` crashes when column is nullable but type is not
4. **dict_sink_operator.cpp**: `execute()` + `execute_type()` without reconciliation
5. **ColumnConst(ColumnNullable(...)) edge case**: All nullable guards (including the original commit's) used `column->is_nullable()` which returns false for `ColumnConst` (inherits `IColumn` default). Fixed by using `unpack_if_const(column).first->is_nullable()` to check the inner column.
### Release note
None
### Check List (For Author)
- Test: Regression test (14 test cases all passed, including 10 new cases covering CAST, IF, IFNULL, IN, CASE WHEN, arithmetic, nested round, nullable join, COALESCE, subquery filter)
- Behavior changed: No
- Does this need documentation: No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](be) Fix column/type nullability mismatch at VExpr output boundary and additional expression paths [doris]
Posted by "jacktengg (via GitHub)" <gi...@apache.org>.
jacktengg closed pull request #62566: [fix](be) Fix column/type nullability mismatch at VExpr output boundary and additional expression paths
URL: https://github.com/apache/doris/pull/62566
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](be) Fix column/type nullability mismatch at VExpr output boundary and additional expression paths [doris]
Posted by "Thearas (via GitHub)" <gi...@apache.org>.
Thearas commented on PR #62566:
URL: https://github.com/apache/doris/pull/62566#issuecomment-4260727027
Thank you for your contribution to Apache Doris.
Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/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?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](be) Fix column/type nullability mismatch at VExpr output boundary and additional expression paths [doris]
Posted by "jacktengg (via GitHub)" <gi...@apache.org>.
jacktengg commented on PR #62566:
URL: https://github.com/apache/doris/pull/62566#issuecomment-4278618799
Close this PR, it's fixed in #60569
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org