-
Notifications
You must be signed in to change notification settings - Fork 235
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
Add GpuMapConcat
support for nested-type values
#5686
Add GpuMapConcat
support for nested-type values
#5686
Conversation
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
simplify shrink the test size Signed-off-by: remzi <[email protected]>
build |
Signed-off-by: remzi <[email protected]>
build |
Signed-off-by: remzi <[email protected]>
build |
sql-plugin/src/main/scala/org/apache/spark/sql/rapids/collectionOperations.scala
Show resolved
Hide resolved
TypeSig.MAP.nested(TypeSig.all), | ||
repeatingParamCheck = Some(RepeatingParamCheck("input", | ||
TypeSig.MAP.nested(TypeSig.commonCudfTypes + TypeSig.DECIMAL_128 + | ||
TypeSig.NULL), | ||
TypeSig.NULL + TypeSig.ARRAY + TypeSig.STRUCT + TypeSig.MAP), |
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.
The problem here is that the checks don't distinguish between keys and values in a map. This check is adding nested support for both keys and values, but the code can only support nested types for values, not keys.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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!
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.
I don't know how could we test the nested key type cases, as MapGen
does not support ArrayGen
as the keys. (List in Python is unhashable)
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.
Can we add a psNote to the param checks so it is clearly documented that keys don't support arrays? As for the tests, when we do support arrays for map keys we can write the tests in scala or we can work around it by creating a list of key/value structs and then converting it to a map, do the computation, and then convert the resulting map back to a list of key/value structs after we are done. I think a scala test is preferable but either would work.
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! And I have added 2 cases to test the falling back.
Signed-off-by: remzi <[email protected]>
build |
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.
Just a nit for documentation
TypeSig.MAP.nested(TypeSig.all), | ||
repeatingParamCheck = Some(RepeatingParamCheck("input", | ||
TypeSig.MAP.nested(TypeSig.commonCudfTypes + TypeSig.DECIMAL_128 + | ||
TypeSig.NULL), | ||
TypeSig.NULL + TypeSig.ARRAY + TypeSig.STRUCT + TypeSig.MAP), |
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.
Can we add a psNote to the param checks so it is clearly documented that keys don't support arrays? As for the tests, when we do support arrays for map keys we can write the tests in scala or we can work around it by creating a list of key/value structs and then converting it to a map, do the computation, and then convert the resulting map back to a list of key/value structs after we are done. I think a scala test is preferable but either would work.
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
build |
There is a weird failure: https://github.com/NVIDIA/spark-rapids/runs/6897078626?check_suite_focus=true#step:2:28678
|
build |
That is a really odd error. I think it has to be a transient error, but I am not sure on it. |
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: would be nice to have a partial support tag on the param checks, but that is minor.
sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuOverrides.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: remzi <[email protected]>
build |
Hi @revans2, sorry I am a little confused about what the |
This is the |
Signed-off-by: remzi [email protected]
Re #5559.
Changes in this PR:
GpuMapConcat
function by concatenating the map columns directly.map_gens_sample