github-actions[bot] commented on code in PR #68438:
URL: https://github.com/apache/doris/pull/68438#discussion_r4119564581
##########
be/src/exprs/function/array/function_array_shuffle.cpp:
##########
@@ -64,21 +63,40 @@ class FunctionArrayShuffle : public IFunction {
return arguments[0];
}
+ // Shuffle a constant array on each row too, so every row gets its own
order.
Review Comment:
[P1] Prevent file-scan localization from evaluating this row-varying shuffle
twice.
For a Parquet/ORC scan with `WHERE a = array_shuffle(array_range(20), 1)`,
the new constant override makes successive physical rows draw different
permutations. `TableColumnMapper::localize_filters` admits a file-local copy
because BE `VectorizedFnCall::is_deterministic()` omits both `array_shuffle`
and `shuffle`; Scanner then evaluates the original predicate on the surviving
rows. If the first file row is rejected, a later row that matched its own
permutation is checked again as the first survivor against the first
permutation and can be discarded. The added constant-array test confirms
successive permutations differ. Mark both names nondeterministic in BE (or
exclude them from this localization) and add a file-scan predicate regression.
--
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]