-
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
Changes from 1 commit
f93ff26
47d24a0
e980afe
846d2be
4f2631e
ef5d0ed
182488c
19a0642
0e27b0c
82e70f8
3ec8987
a395e4a
09ea391
02f8399
5321ae7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. nit: we can use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated. |
||
TypeSig.ARRAY + TypeSig.STRUCT, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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. |
||
TypeSig.all, | ||
repeatingParamCheck = Some(RepeatingParamCheck("param", | ||
TypeSig.commonCudfTypes + TypeSig.NULL + TypeSig.DECIMAL, | ||
TypeSig.all))), | ||
(TypeSig.commonCudfTypes + TypeSig.NULL + TypeSig.DECIMAL).nested() + | ||
TypeSig.ARRAY + TypeSig.STRUCT, | ||
TypeSig.all))), | ||
(a, conf, p, r) => new ExprMeta[Coalesce](a, conf, p, r) { | ||
override def convertToGpu(): GpuExpression = GpuCoalesce(childExprs.map(_.convertToGpu())) | ||
}), | ||
|
@@ -1739,13 +1742,18 @@ object GpuOverrides { | |
}), | ||
expr[If]( | ||
"IF expression", | ||
ExprChecks.projectNotLambda(TypeSig.commonCudfTypes + TypeSig.NULL + TypeSig.DECIMAL, | ||
ExprChecks.projectNotLambda( | ||
(TypeSig.commonCudfTypes + TypeSig.NULL + TypeSig.DECIMAL).nested() + | ||
TypeSig.ARRAY + TypeSig.STRUCT, | ||
TypeSig.all, | ||
Seq(ParamCheck("predicate", TypeSig.psNote(TypeEnum.BOOLEAN, | ||
"literal values are not supported"), TypeSig.BOOLEAN), | ||
ParamCheck("trueValue", TypeSig.commonCudfTypes + TypeSig.NULL + TypeSig.DECIMAL, | ||
Seq(ParamCheck("predicate", TypeSig.BOOLEAN, TypeSig.BOOLEAN), | ||
ParamCheck("trueValue", | ||
(TypeSig.commonCudfTypes + TypeSig.NULL + TypeSig.DECIMAL).nested() + | ||
TypeSig.ARRAY + TypeSig.STRUCT, | ||
TypeSig.all), | ||
ParamCheck("falseValue", TypeSig.commonCudfTypes + TypeSig.NULL + TypeSig.DECIMAL, | ||
ParamCheck("falseValue", | ||
(TypeSig.commonCudfTypes + TypeSig.NULL + TypeSig.DECIMAL).nested() + | ||
TypeSig.ARRAY + TypeSig.STRUCT, | ||
TypeSig.all))), | ||
(a, conf, p, r) => new ExprMeta[If](a, conf, p, r) { | ||
override def convertToGpu(): GpuExpression = { | ||
|
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.