BiteTheDDDDt commented on code in PR #27891: URL: https://github.com/apache/doris/pull/27891#discussion_r1413318846
########## be/src/vec/functions/function_string.h: ########## @@ -1576,9 +1574,10 @@ class FunctionSubstringIndex : public IFunction { auto& res_offsets = res->get_offsets(); auto& res_chars = res->get_chars(); res_offsets.resize(input_rows_count); - - ColumnPtr content_column = - block.get_by_position(arguments[0]).column->convert_to_full_column_if_const(); + ColumnPtr content_column; + bool content_const = false; + std::tie(content_column, content_const) = + unpack_if_const(block.get_by_position(arguments[0]).column); Review Comment: This function requires parameters other than content to be const. Then when the content is also const, it will go through the logic of use_default_implementation_for_constants and convert the const column into a normal column. So content column does not need to converted. -- 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