-
Notifications
You must be signed in to change notification settings - Fork 236
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
Support ElementAt #2260
Support ElementAt #2260
Conversation
sql-plugin/src/main/scala/org/apache/spark/sql/rapids/complexTypeExtractors.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuOverrides.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuOverrides.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
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
sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuOverrides.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuOverrides.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/com/nvidia/spark/rapids/GpuOverrides.scala
Outdated
Show resolved
Hide resolved
build |
sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuOverrides.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuOverrides.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuOverrides.scala
Outdated
Show resolved
Hide resolved
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 found that ElementAt
is located at collectionOperations.scala
instead of complexTypeExtractors.scala
in Spark. Shall we move GpuElementAt
into collectionOperations.scala
to follow the structure of Spark SQL ?
For most expressions I think it is good to try and mirror where Spark has them so yes. |
Signed-off-by: Allen Xu <[email protected]>
build |
Signed-off-by: Allen Xu <[email protected]>
Signed-off-by: Allen Xu <[email protected]>
build |
build |
build |
sql-plugin/src/main/scala/org/apache/spark/sql/rapids/collectionOperations.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/org/apache/spark/sql/rapids/collectionOperations.scala
Show resolved
Hide resolved
Signed-off-by: Allen Xu <[email protected]>
build |
Support ElementAt. Signed-off-by: Allen Xu <[email protected]>
Support ElementAt. Signed-off-by: Allen Xu <[email protected]>
This PR is to close #2060. This gives initial support for
element_at
.Note apache/spark#30297 introduce different behaviors for element_at when invalid index or key is given to lhs with ansi mode enabled and disabled.
A follow-up issue is created to track the difference.
For
select element_at(Array(1,2,3), 4)
:Spark 3.0.2 + spark.sql.ansi.enabled=true:
Spark 3.1.1 + spark.sql.ansi.enabled=true:
For
select element_at(map(1, 'a', 2, 'b'), 3)
:Spark 3.0.2 + spark.sql.ansi.enabled=true:
Spark 3.1.1 + spark.sql.ansi.enabled=true:
Signed-off-by: Allen Xu [email protected]