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
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,15 @@ std::unique_ptr<common::Filter> toFilter(
auto equatableValueSet =
std::dynamic_pointer_cast<protocol::EquatableValueSet>(
domain.values)) {
if (equatableValueSet->entries.empty()) {
if (nullAllowed) {
return std::make_unique<common::IsNull>();
} else {
return std::make_unique<common::IsNotNull>();
}
}
VELOX_UNSUPPORTED(
"EquatableValueSet to Velox filter conversion is not supported yet.");
"EquatableValueSet (with non-empty entries) to Velox filter conversion is not supported yet.");
} else if (
auto allOrNoneValueSet =
std::dynamic_pointer_cast<protocol::AllOrNoneValueSet>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,10 @@ public void testIsNullIsNotNull()
{
assertQuery("SELECT count(*) FROM orders where clerk is not null");
assertQuery("SELECT count(*) FROM orders where clerk is null");
assertQuery("select count(*) from orders_ex where quantities is null");
assertQuery("select count(*) from orders_ex where quantities is not null");
assertQuery("select count(*) from orders_ex where quantity_by_linenumber is null");
assertQuery("select count(*) from orders_ex where quantity_by_linenumber is not null");
}

@Test
Expand Down