HappenLee commented on code in PR #36004:
URL: https://github.com/apache/doris/pull/36004#discussion_r1630966743
##########
be/src/vec/functions/comparison_equal_for_null.cpp:
##########
@@ -75,33 +79,62 @@ class FunctionEqForNull : public IFunction {
} else if (left_only_null) {
auto right_type_nullable = col_right.type->is_nullable();
if (!right_type_nullable) {
+ // right_column is not nullable, so result is all false.
block.get_by_position(result).column =
ColumnVector<UInt8>::create(input_rows_count, 0);
} else {
- auto const* nullable_right_col =
- assert_cast<const
ColumnNullable*>(col_right.column.get());
+ // right_column is nullable
+ const ColumnNullable* nullable_right_col = nullptr;
+ if (right_const) {
+ nullable_right_col = assert_cast<const ColumnNullable*>(
+ &(assert_cast<const
ColumnConst*>(col_right.column.get())
+ ->get_data_column()));
+ } else {
+ nullable_right_col = assert_cast<const
ColumnNullable*>(col_right.column.get());
+ }
+ // left column is all null, so result has same nullmap with
right column.
block.get_by_position(result).column =
Review Comment:
if right_const, here do `clone_reisze` is error;
--
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]