zxealous commented on code in PR #10749: URL: https://github.com/apache/doris/pull/10749#discussion_r918913889
########## be/src/vec/functions/function_string.h: ########## @@ -553,20 +563,126 @@ class FunctionStringConcatWs : public IFunction { fmt::memory_buffer buffer; std::vector<std::string_view> views; + if (check_column<ColumnArray>(argument_columns[1].get())) { + // Determine if the nested type of the array is String + const ColumnArray& array_column = + reinterpret_cast<const ColumnArray&>(*argument_columns[1]); + if (!array_column.get_data().is_column_string()) { + return Status::NotSupported( + fmt::format("unsupported nested array of type {} for function {}", + is_column_nullable(array_column.get_data()) + ? array_column.get_data().get_name() + : array_column.get_data().get_family_name(), Review Comment: now, after modification, it can return the correct information ``` mysql> select *, concat_ws(str, c_array) from int_test; ERROR 1105 (HY000): errCode = 2, detailMessage = unsupported nested array of type Nullable(Int32) for function concat_ws ``` ########## be/src/vec/functions/function_string.h: ########## @@ -553,20 +563,126 @@ class FunctionStringConcatWs : public IFunction { fmt::memory_buffer buffer; std::vector<std::string_view> views; + if (check_column<ColumnArray>(argument_columns[1].get())) { + // Determine if the nested type of the array is String + const ColumnArray& array_column = + reinterpret_cast<const ColumnArray&>(*argument_columns[1]); + if (!array_column.get_data().is_column_string()) { + return Status::NotSupported( + fmt::format("unsupported nested array of type {} for function {}", + is_column_nullable(array_column.get_data()) + ? array_column.get_data().get_name() + : array_column.get_data().get_family_name(), Review Comment: if we dont consider nullable, and array's nested type is nullable, here will return like this: ``` mysql> select * from int_test; +------+------+-----------+ | id | str | c_array | +------+------+-----------+ | 1 | - | [1, 2, 3] | | 1 | - | [1, 2, 3] | +------+------+-----------+ 2 rows in set (0.02 sec) mysql> select *, concat_ws(str, c_array) from int_test; ERROR 1105 (HY000): errCode = 2, detailMessage = unsupported nested array of type Nullable for function concat_ws ``` -- 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