-
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
GpuSequence refactor[databricks] #4520
Conversation
And update the tests Signed-off-by: Firestarman <firestarmanllc@gmail.com>
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
Outdated
Show resolved
Hide resolved
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
Outdated
Show resolved
Hide resolved
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
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/org/apache/spark/sql/rapids/collectionOperations.scala
Show resolved
Hide resolved
sql-plugin/src/main/scala/org/apache/spark/sql/rapids/collectionOperations.scala
Outdated
Show resolved
Hide resolved
withResource(stops) { _ => | ||
closeOnExcept(starts) { _ => | ||
closeOnExcept(nonNullOption) { _ => | ||
closeOnExcept(stepsOption.getOrElse(defaultSteps(starts, stops))) { steps => |
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.
Do we really want to keep the defaultSteps in the memory?
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.
It is not a must, I think.
If there is an improvement, I want to handle it in the following PR.
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
build |
👎 Promotion blocked, new vulnerability foundVulnerability report
|
build |
build |
build |
Add |
(IntegerGen(min_val=-10, max_val=20, special_cases=[]), | ||
IntegerGen(min_val=20, max_val=50, special_cases=[]), | ||
IntegerGen(min_val=1, max_val=5, special_cases=[])), | ||
(LongGen(min_val=-10, max_val=20, special_cases=[None]), |
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 like your test case can't cover below scenario?
start, stop, step
2, 10, 1
10, 1, -1
2, 2, 0
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 does.
You can refer to the gens in sequence_normal_integral_gens
. There are comments to describe each case indivdually.
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.
OK, you mean the 3 cases mixed in a single dataset. Added test_sequence_with_step_mixed_cases
.
failed blossom PVC lock. let me retrigger |
build |
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
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
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/org/apache/spark/sql/rapids/collectionOperations.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
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.
Default steps handling via a lazy val of a function is a bit odd, but I don't think it's a blocker for this to be merged.
The first thought of this is to avoid running the |
This refactor mainly covers:
GpuSequence
andGpuSequenceWithStep
into oneGpuSequence
to avoid some duplicate code. And get ready for the shim layers that will come with time/date types support.GpuSequence
extends fromGpuExpression
instead of the original binary or ternary expression to handle the children evaluation directly.Fixes #4506
Fixes #4499
Signed-off-by: Firestarman firestarmanllc@gmail.com