zhiqiang-hhhh commented on code in PR #55631:
URL: https://github.com/apache/doris/pull/55631#discussion_r2321168240
##########
be/src/vec/functions/array/function_array_distance.h:
##########
@@ -109,55 +122,86 @@ class FunctionArrayDistance : public IFunction {
get_name(), col1->size(), col2->size()));
}
- ColumnArrayExecutionData arr1;
- ColumnArrayExecutionData arr2;
- if (!extract_column_array_info(*col1, arr1) ||
!extract_column_array_info(*col2, arr2)) {
- return Status::RuntimeError(fmt::format("unsupported types for
function {}({}, {})",
- get_name(),
arg1.type->get_name(),
- arg2.type->get_name()));
+ const ColumnArray* arr1 = nullptr;
+ const ColumnArray* arr2 = nullptr;
+
+ if (col1->is_nullable()) {
+ if (col1->has_null()) {
+ throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
+ "Arguments for function {} cannot be
null", get_name());
+ }
Review Comment:
> A minor advice:
>
> So that we can distinguish it from line 141~142 to help user locate the
exception quicker.
ok
--
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]