[Chore](execution) add check for do_projections#60389
[Chore](execution) add check for do_projections#60389BiteTheDDDDt merged 1 commit intoapache:masterfrom
Conversation
|
run buildall |
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
There was a problem hiding this comment.
Pull request overview
This pull request adds runtime validation checks to catch column size inconsistencies during projection and expression evaluation operations. The changes replace some debug assertions (DCHECK) with runtime error checks that return InternalError status with descriptive messages.
Changes:
- Converted DCHECK to runtime error check in VCaseExpr::execute_column for result column size validation
- Added empty projection validation in OperatorXBase::do_projections
- Added column size validation for intermediate projections with expression debug info
- Added validation after intermediate projections to ensure row count consistency
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| be/src/vec/exprs/vcase_expr.cpp | Replaced DCHECK_EQ with runtime check for case expression result column size validation |
| be/src/pipeline/exec/operator.cpp | Added multiple runtime checks for projection operations: empty projection detection, intermediate projection column size validation, and final row count verification |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
1 similar comment
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
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?
This pull request introduces additional validation checks to ensure the integrity of column sizes during projection and expression evaluation operations. These changes help catch and report inconsistencies early, improving the robustness and debuggability of the code.
Validation and Error Handling Improvements:
OperatorXBase::do_projectionsto return an internal error if any intermediate projection is empty, or if the result column size does not match the expected number of input rows, including detailed error messages for easier debugging.OperatorXBase::do_projectionsto verify that the result column size matches the input, with error reporting including the expression's debug string.VCaseExpr::execute_columnto return an internal error if the result column size does not match the expected count, replacing the previous debug assertion with a runtime check and descriptive error message.Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)