Skip to content
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

Merged
merged 15 commits into from
Jul 23, 2021

Conversation

firestarman
Copy link
Collaborator

GpuIf and GpuCoalesce support scalar of list and struct.

closes #2398

Signed-off-by: Firestarman firestarmanllc@gmail.com

Signed-off-by: Firestarman <firestarmanllc@gmail.com>
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
@firestarman
Copy link
Collaborator Author

This PR depends on #2826 , so it is WIP now.

@firestarman firestarman added cudf_dependency An issue or PR with this label depends on a new feature in cudf feature request New feature or request labels Jun 29, 2021
jlowe
jlowe previously approved these changes Jun 29, 2021
@@ -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)
Copy link
Collaborator

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?

Copy link
Collaborator Author

@firestarman firestarman Jun 30, 2021

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() +
Copy link
Collaborator

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

Copy link
Collaborator Author

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,
Copy link
Collaborator

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?

Copy link
Collaborator Author

@firestarman firestarman Jun 30, 2021

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>
@firestarman firestarman changed the title [WIP] GpuIf and GpuCoalesce support scalar of list&struct [WIP] GpuIf and GpuCoalesce support array and struct types Jun 30, 2021
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>
@firestarman firestarman changed the title [WIP] GpuIf and GpuCoalesce support array and struct types GpuIf and GpuCoalesce support array and struct types Jul 21, 2021
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
@firestarman firestarman marked this pull request as ready for review July 21, 2021 05:21
@firestarman
Copy link
Collaborator Author

build

@sperlingxx
Copy link
Collaborator

LGTM

Signed-off-by: Firestarman <firestarmanllc@gmail.com>
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
@firestarman
Copy link
Collaborator Author

build

@firestarman firestarman merged commit 94d9ad7 into NVIDIA:branch-21.08 Jul 23, 2021
@firestarman firestarman deleted the gpu-if-coalesce branch July 23, 2021 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cudf_dependency An issue or PR with this label depends on a new feature in cudf feature request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] GpuIf and GpuCoalesce supports ArrayType
4 participants