zhiqiang-hhhh commented on code in PR #55184:
URL: https://github.com/apache/doris/pull/55184#discussion_r2297963217
##########
be/src/vec/functions/array/function_array_distance.h:
##########
@@ -140,27 +137,14 @@ class FunctionArrayDistance : public IFunction {
}
// prepare return data
- auto dst = ColumnFloat64::create(input_rows_count);
+ auto dst = ColumnType::create(input_rows_count);
auto& dst_data = dst->get_data();
- auto dst_null_column = ColumnUInt8::create(input_rows_count, 0);
- auto& dst_null_data = dst_null_column->get_data();
const auto& offsets1 = *arr1.offsets_ptr;
const auto& offsets2 = *arr2.offsets_ptr;
- const auto& nested_col1 = assert_cast<const
ColumnFloat64*>(arr1.nested_col.get());
- const auto& nested_col2 = assert_cast<const
ColumnFloat64*>(arr2.nested_col.get());
+ const auto& nested_col1 = assert_cast<const
ColumnType*>(arr1.nested_col.get());
Review Comment:
I think you can add a regression test.
```sql
set debug_skip_fold_constant=true;
select l2_distance([1.0, 2.0, 3.0], [1.0, null, 3.0]);
select l2_distance([1.0, 2.0, 3.0], null);
```
Both of above sql return NULL in current master.
--
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]