HappenLee commented on code in PR #66442:
URL: https://github.com/apache/doris/pull/66442#discussion_r3713872431
##########
be/src/exprs/vtopn_pred.h:
##########
@@ -284,6 +272,27 @@ class VTopNPred : public VExpr {
}
private:
+ ColumnPtr _normalize_filter_result(ColumnPtr column) const {
+ const size_t rows = column->size();
+ if (const auto* constant = check_and_get_column<ColumnConst>(*column))
{
+ auto nested =
_normalize_filter_result(constant->get_data_column_ptr());
+ return ColumnConst::create(std::move(nested), rows);
Review Comment:
Fixed in 0b42c4e188a. `_normalize_filter_result()` now collapses SQL NULL
into the NULLS FIRST/LAST Boolean decision, clears the null map, and preserves
the `ColumnNullable` wrapper. The recursive const path therefore returns
`ColumnConst(ColumnNullable(ColumnUInt8))`, matching the declared
`Nullable(Boolean)` type. The regression test now exercises
`VExprContext::execute(Block*, int*)` and asserts the const-nullable physical
shape for both NULLS FIRST and NULLS LAST. Verified with
`GLIBC_COMPATIBILITY=OFF ./run-be-ut.sh -j 48 --run
--filter=RuntimePredicateTest.*` (11 tests passed).
--
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]