-
Notifications
You must be signed in to change notification settings - Fork 240
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
GpuIf and GpuCoalesce support array and struct types #2839
GpuIf and GpuCoalesce support array and struct types #2839
Conversation
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
This PR depends on #2826 , so it is WIP now. |
@@ -92,7 +92,7 @@ def test_nvl(data_gen): | |||
'nvl(a, {})'.format(null_lit))) | |||
|
|||
#nvl is translated into a 2 param version of coalesce | |||
@pytest.mark.parametrize('data_gen', all_gens, ids=idfn) | |||
@pytest.mark.parametrize('data_gen', all_gens + all_single_nested_gens, ids=idfn) |
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.
Is all_single_nested_gens
defined?
can we add struct_gens_sample
for deeper nesting?
we are also enabling arrays¸ can we add their gens too?
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.
Yes, it is defined in PR #2826, on which this PR depends.
I will add deeper nesting if it is supported by PR rapidsai/cudf#8588 . But verification is required at first.
@@ -1187,10 +1187,13 @@ object GpuOverrides { | |||
expr[Coalesce] ( | |||
"Returns the first non-null argument if exists. Otherwise, null", | |||
ExprChecks.projectNotLambda( | |||
TypeSig.commonCudfTypes + TypeSig.NULL + TypeSig.DECIMAL, TypeSig.all, | |||
(TypeSig.commonCudfTypes + TypeSig.NULL + TypeSig.DECIMAL).nested() + |
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.
nit: we can use _commonTypes
for this common combination
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.
Updated.
@@ -1187,10 +1187,13 @@ object GpuOverrides { | |||
expr[Coalesce] ( | |||
"Returns the first non-null argument if exists. Otherwise, null", | |||
ExprChecks.projectNotLambda( | |||
TypeSig.commonCudfTypes + TypeSig.NULL + TypeSig.DECIMAL, TypeSig.all, | |||
(TypeSig.commonCudfTypes + TypeSig.NULL + TypeSig.DECIMAL).nested() + | |||
TypeSig.ARRAY + TypeSig.STRUCT, |
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.
are we going to add arbitrary nesting in a follow-up?
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.
Yes, I will add deeper nesting if it is supported by PR rapidsai/cudf#8588 . But verification is required at first.
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
build |
LGTM |
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
build |
GpuIf
andGpuCoalesce
support scalar of list and struct.closes #2398
Signed-off-by: Firestarman firestarmanllc@gmail.com