-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support array_intersect(Unknown) #12448
base: main
Are you sure you want to change the base?
feat: Support array_intersect(Unknown) #12448
Conversation
✅ Deploy Preview for meta-velox canceled.
|
@kewang1024 @kevinwilfong @mbasmanova Could you please review it, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xiaodouchen Would this function run into same / similar limitation in Fuzzer as array_join?
CC: @kgpai @kagamiori
@@ -622,7 +622,10 @@ std::shared_ptr<exec::VectorFunction> createTypedArraysIntersectExcept( | |||
VELOX_CHECK_EQ(inputArgs.size(), 2); | |||
const BaseVector* rhs = inputArgs[1].constantValue.get(); | |||
|
|||
if (elementType->providesCustomComparison()) { | |||
if constexpr (kind == TypeKind::UNKNOWN) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UNKNOWN values can only be nulls. Intersecting arrays of NULLs can be done faster by looking at just the array sizes, no?
This change affects array_except function as well? If so, can we add test coverage?
@@ -735,3 +735,50 @@ TEST_F(ArrayIntersectTest, nullInDictionary) { | |||
makeNullableArrayVector<int64_t>({{{1}}, std::nullopt, {{7}}}); | |||
testExpr(expected, "array_intersect(c0)", {arrays}); | |||
} | |||
|
|||
TEST_F(ArrayIntersectTest, unknownArrays) { | |||
auto array1 = makeNullableArrayVector<UnknownValue>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit hard to read. Is there a way to extend makeArrayVectorFromJson to work with Unknown?
No description provided.