Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions be/src/vec/common/columns_hashing.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,12 @@ struct HashMethodSingleLowNullableColumn : public SingleColumnMethod {

template <typename Data, typename Key>
ALWAYS_INLINE FindResult find_key_with_hash(Data& data, size_t i, Key key, size_t hash_value) {
if (key_column->is_null_at(i) && data.has_null_key_data()) {
return FindResult {&data.template get_null_key_data<Mapped>(), true};
if (key_column->is_null_at(i)) {
if (data.has_null_key_data()) {
return FindResult {&data.template get_null_key_data<Mapped>(), true};
} else {
return FindResult {nullptr, false};
}
}
return Base::find_key_impl(key, hash_value, data);
}
Expand Down
2 changes: 2 additions & 0 deletions regression-test/data/query_p0/operator/test_set_operator.out
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@
5 5
7 7

-- !test --

27 changes: 27 additions & 0 deletions regression-test/suites/query_p0/operator/test_set_operator.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,31 @@ suite("test_set_operators", "query,p0,arrow_flight_sql") {
order_qt_select_except """
select col1, col1 from t1 except select col1, col1 from t2;
"""

sql """
DROP TABLE IF EXISTS a_table;
"""
sql """
create table a_table (
k1 int null
)
duplicate key (k1)
distributed BY hash(k1) buckets 3
properties("replication_num" = "1");
"""
sql """
DROP TABLE IF EXISTS b_table;
"""
sql """
create table b_table (
k1 int null
)
duplicate key (k1)
distributed BY hash(k1) buckets 3
properties("replication_num" = "1");
"""

sql "insert into a_table select 0;"
sql "insert into b_table select null;"
qt_test "select * from a_table intersect select * from b_table;"
}
Loading