-
Notifications
You must be signed in to change notification settings - Fork 245
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 support for org.apache.spark.sql.catalyst.expressions.ArrayPosition
[databricks]
#12308
base: branch-25.04
Are you sure you want to change the base?
Conversation
Signed-off-by: Yan Feng <fengyan_@mail.ustc.edu.cn>
org.apache.spark.sql.catalyst.expressions.ArrayPosition
org.apache.spark.sql.catalyst.expressions.ArrayPosition
[databricks]
sql-plugin/src/main/scala/org/apache/spark/sql/rapids/complexTypeExtractors.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/org/apache/spark/sql/rapids/complexTypeExtractors.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/org/apache/spark/sql/rapids/complexTypeExtractors.scala
Outdated
Show resolved
Hide resolved
…ypeExtractors.scala Co-authored-by: Liangcai Li <firestarmanllc@gmail.com>
sql-plugin/src/main/scala/org/apache/spark/sql/rapids/complexTypeExtractors.scala
Show resolved
Hide resolved
(in, conf, p, r) => new BinaryExprMeta[ArrayPosition](in, conf, p, r) { | ||
override def convertToGpu(lhs: Expression, rhs: Expression): GpuExpression = | ||
GpuArrayPosition(lhs, rhs) |
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.
Anonymous classes are unnecessarily difficult to debug when the conversion code throws #10838
Look at https://github.com/NVIDIA/spark-rapids/pull/10839/files for an example
Signed-off-by: Yan Feng <fengyan_@mail.ustc.edu.cn>
Signed-off-by: Yan Feng <fengyan_@mail.ustc.edu.cn>
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.
Looks good to me
build |
Closes #5224
This PR adds support for
org.apache.spark.sql.catalyst.expressions.ArrayPosition
.Ran a simple perf test for 5 times
Results:
key
is a scalarkey
is a columnThe results showed that the
GpuArrayPosition
(TITAN RTX) demonstrated approximately 4 times speedup compared to theCpuArrayPosition
(8 CPU cores).