-
Notifications
You must be signed in to change notification settings - Fork 237
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 HiveHash
support for nested types
#11660
Conversation
Signed-off-by: ustcfy <[email protected]>
HiveHash
support for nested types
Signed-off-by: Yan Feng <[email protected]>
Looks good to me, but better have more looks at this. |
Signed-off-by: Yan Feng <[email protected]>
Signed-off-by: Yan Feng <[email protected]>
build |
} | ||
val maxDepth = a.children.map(c => getMaxNestedDepth(c.dataType)).max | ||
if (maxDepth > 8) { | ||
willNotWorkOnGpu(s"GPU HiveHash supports 8 levels at most for " + |
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 test for this fallback ?
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 should better retrieve this maxDepth
from JNI instead, so if we change the max depth support in the future, we won't have to modify this code.
Check out the example this approach here:
spark-rapids/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuGetJsonObject.scala
Lines 105 to 106 in 730ff2c
def fallbackCheck(instructions: List[PathInstruction]): Boolean = | |
instructions.length > JSONUtils.MAX_PATH_DEPTH |
TypeSig.psNote(TypeEnum.ARRAY, "Nested levels exceeding 8 layers are not supported") + | ||
TypeSig.psNote(TypeEnum.STRUCT, "Nested levels exceeding 8 layers are not supported"), |
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.
Don't explicitly say "8 layers" as this can be changed at anytime.
Signed-off-by: Yan Feng <[email protected]>
Signed-off-by: Yan Feng <[email protected]>
build |
closes #11674
This PR adds support for Hive hash with
struct
andlist
types, and it depends on NVIDIA/spark-rapids-jni#2534