Doris-Breakwater commented on issue #68685: URL: https://github.com/apache/doris/issues/68685#issuecomment-5911590341
Breakwater-GitHub-Analysis-Slot: slot_a08d4a6e4bd0 **Initial assessment:** This is a potentially high-impact BE availability bug. The supplied stack and `Bad cast ... ColumnStr ... to ColumnConst` message point to predicate normalization during scan open. I have not reproduced the abort against the reported custom binary, so the exact build-specific cause remains provisional. The issue is currently open with no labels. **Source findings:** In the available Doris source, [`VExpr::is_constant()`](https://github.com/apache/doris/blob/82646c38c0069eee4b1704eafef416f969bd4b93/be/src/exprs/vexpr.cpp#L811-L836) only establishes that the expression's children are constant; `get_const_col()` stores the column returned by evaluation without enforcing a `ColumnConst` wrapper. The local `master` implementation of [`OlapScanLocalState::_should_push_down_binary_predicate()`](https://github.com/apache/doris/blob/82646c38c0069eee4b1704eafef416f969bd4b93/be/src/exec/operator/olap_scan_operator.cpp#L104-L123) casts that result to `ColumnConst` without checking its runtime type. This supports the reported cast mismatch if the constant expression returns a plain string column. By comparison, the available [`branch-2.1` implementation](https://github.com/apache/doris/blob/a3052de2e5cbc397d67b9cd9d5cd9701aaa6426c/be/src/pipeline/exec/scan_operator.cpp#L727-L764) checks for `ColumnConst` and returns `UNACCEPTABLE` oth erwise; its normalization path [retains a rejected predicate for expression evaluation](https://github.com/apache/doris/blob/a3052de2e5cbc397d67b9cd9d5cd9701aaa6426c/be/src/pipeline/exec/scan_operator.cpp#L382-L389). These source snapshots are **not** the reporter's custom `2.1.12-stable` build, and their code layout differs from the supplied stack. **Recommended next steps:** Please identify the exact BE source commit/build provenance and confirm the code at the reported cast site. If it matches the unchecked path, handle a non-`ColumnConst` result without aborting and keep the predicate for normal evaluation; the checked `branch-2.1` path is a useful reference. Add a regression using the supplied minimal `VARCHAR`/`COALESCE(NULLIF(...))` query, compare it with the equivalent literal predicate, and verify both correct rows and BE survival. It would also be useful to check the same assumption at other binary-predicate pushdown sites in that build. **Information needed to confirm:** exact BE commit SHA (plus FE version/commit if different), whether the minimal SQL reproduces on a clean table with that binary, the query ID and surrounding BE log/core details, and `EXPLAIN` or the fragment plan showing the failing predicate. These will distinguish a custom-build divergence from a branch-wide issue and confirm the folding shape. **Immediate mitigation:** Stop automatic retries of the offending dashboard query and use a semantically equivalent literal predicate where possible (as in the report) until the affected binary is fixed. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
