github-actions[bot] commented on code in PR #63076:
URL: https://github.com/apache/doris/pull/63076#discussion_r3207578305


##########
be/src/exprs/function/uniform.cpp:
##########
@@ -157,6 +159,8 @@ class FunctionUniform : public IFunction {
         return Impl::get_variadic_argument_types();

Review Comment:
   This override makes the default all-constant path keep `min`/`max` as 
`ColumnConst` but unwrap the seed argument to its nested data column. In 
`PreparedFunctionImpl::default_implementation_for_constant_arguments`, 
`temporary_block.rows()` is then taken from the first column, so for a 
row-producing query such as a classic-planner path that reaches BE with 
`uniform(1, 100, 1)`, the temp block has `min` as `ColumnConst(size = 
input_rows_count)` and seed as `ColumnInt64(size = 1)`. `execute_impl` loops 
`input_rows_count` rows and `ColumnView` treats the unwrapped seed as 
non-const, so `value_at(1)` and later read past the one-row seed column.
   
   Nereids currently rejects a literal seed, but this BE function is also the 
execution boundary for non-Nereids/classic and BE constant-fold paths, and this 
PR specifically changes BE constant handling. Please either enforce the third 
argument must not be constant at BE execution/open time or disable/adjust the 
default constant-argument path so the seed remains a correctly sized 
`ColumnConst` rather than a one-row nested column.



-- 
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]

Reply via email to