HappenLee commented on code in PR #25306: URL: https://github.com/apache/doris/pull/25306#discussion_r1357829182
########## be/src/vec/functions/function_quantile_state.cpp: ########## @@ -191,14 +191,28 @@ class FunctionQuantileStatePercent : public IFunction { } auto str_col = assert_cast<const ColumnQuantileState*>(column.get()); auto& col_data = str_col->get_data(); - auto percent_arg = check_and_get_column_const<ColumnFloat32>( - block.get_by_position(arguments.back()).column); + float percent_arg_value = -1.0; + const auto& [percent_column, percent_column_const] = + unpack_if_const(block.get_by_position(arguments[1]).column); - if (!percent_arg) { Review Comment: why remove the logic,the second arg should be const ########## be/src/vec/functions/function_quantile_state.cpp: ########## @@ -191,14 +191,28 @@ class FunctionQuantileStatePercent : public IFunction { } auto str_col = assert_cast<const ColumnQuantileState*>(column.get()); auto& col_data = str_col->get_data(); - auto percent_arg = check_and_get_column_const<ColumnFloat32>( - block.get_by_position(arguments.back()).column); + float percent_arg_value = -1.0; + const auto& [percent_column, percent_column_const] = + unpack_if_const(block.get_by_position(arguments[1]).column); - if (!percent_arg) { Review Comment: why remove the logic,the second arg should be const -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org