-
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
Add support for isNaN and datetime related instructions in UDF compiler #593
Conversation
de08744
to
932a875
Compare
it would be nice to put in title or description the tests are for the udf compiler. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
05ba8bd
to
7552aa0
Compare
7552aa0
to
fac6fd3
Compare
Rebased and open for review now. |
Signed-off-by: Allen Xu <[email protected]>
Signed-off-by: Sean Lee <[email protected]>
We support date and time ops with the following Java/Scala code * DateTimeFormatter.ofPattern * LocalDateTime.parse * LocalDateTime.getYear * LocalDateTime.getMonthValue * LocalDateTime.getDayOfMonth * LocalDateTime.getHour * LocalDateTime.getMinute * LocalDateTime.getSecond Signed-off-by: Sean Lee <[email protected]>
Also modify the tests with various patterns. Signed-off-by: Sean Lee <[email protected]>
Signed-off-by: Sean Lee <[email protected]>
Signed-off-by: Sean Lee <[email protected]>
Signed-off-by: Sean Lee <[email protected]>
7d026e1
to
ad8385a
Compare
@wjxiz1992 I have rebased this PR since #583 has been merged. |
cc @abellina This PR is now ready for review. |
udf-compiler/src/main/scala/com/nvidia/spark/udf/Instruction.scala
Outdated
Show resolved
Hide resolved
…cala Co-authored-by: Alessandro Bellina <[email protected]>
Signed-off-by: Sean Lee <[email protected]>
fa33043
to
06d3187
Compare
The date and time pattern needs to be known at compile time as we need to check whether the pattern is timezone agnostic. If it isn't, it needs to fall back to JVM. Signed-off-by: Sean Lee <[email protected]>
In order for the time functions implemented here to work, the time type must become a Pending CI! |
build |
…er (NVIDIA#593) * Add unit tests for datetime related instructions Signed-off-by: Allen Xu <[email protected]> * Add support for isNaN Signed-off-by: Sean Lee <[email protected]> * Implement date and time ops. We support date and time ops with the following Java/Scala code * DateTimeFormatter.ofPattern * LocalDateTime.parse * LocalDateTime.getYear * LocalDateTime.getMonthValue * LocalDateTime.getDayOfMonth * LocalDateTime.getHour * LocalDateTime.getMinute * LocalDateTime.getSecond Signed-off-by: Sean Lee <[email protected]> * Support non-default formatting pattern Also modify the tests with various patterns. Signed-off-by: Sean Lee <[email protected]> * Add date and time to compatiblity.md Signed-off-by: Sean Lee <[email protected]> * Single-line spacing between tests Signed-off-by: Sean Lee <[email protected]> * Remove redundant calls to udfIsCompiled Signed-off-by: Sean Lee <[email protected]> * Update udf-compiler/src/main/scala/com/nvidia/spark/udf/Instruction.scala Co-authored-by: Alessandro Bellina <[email protected]> * Add a test case with zoned datetime string Signed-off-by: Sean Lee <[email protected]> * Add check against timezoned format The date and time pattern needs to be known at compile time as we need to check whether the pattern is timezone agnostic. If it isn't, it needs to fall back to JVM. Signed-off-by: Sean Lee <[email protected]> Co-authored-by: Allen Xu <[email protected]> Co-authored-by: Sean Lee <[email protected]> Co-authored-by: Sean Lee <[email protected]> Co-authored-by: Alessandro Bellina <[email protected]>
…er (NVIDIA#593) * Add unit tests for datetime related instructions Signed-off-by: Allen Xu <[email protected]> * Add support for isNaN Signed-off-by: Sean Lee <[email protected]> * Implement date and time ops. We support date and time ops with the following Java/Scala code * DateTimeFormatter.ofPattern * LocalDateTime.parse * LocalDateTime.getYear * LocalDateTime.getMonthValue * LocalDateTime.getDayOfMonth * LocalDateTime.getHour * LocalDateTime.getMinute * LocalDateTime.getSecond Signed-off-by: Sean Lee <[email protected]> * Support non-default formatting pattern Also modify the tests with various patterns. Signed-off-by: Sean Lee <[email protected]> * Add date and time to compatiblity.md Signed-off-by: Sean Lee <[email protected]> * Single-line spacing between tests Signed-off-by: Sean Lee <[email protected]> * Remove redundant calls to udfIsCompiled Signed-off-by: Sean Lee <[email protected]> * Update udf-compiler/src/main/scala/com/nvidia/spark/udf/Instruction.scala Co-authored-by: Alessandro Bellina <[email protected]> * Add a test case with zoned datetime string Signed-off-by: Sean Lee <[email protected]> * Add check against timezoned format The date and time pattern needs to be known at compile time as we need to check whether the pattern is timezone agnostic. If it isn't, it needs to fall back to JVM. Signed-off-by: Sean Lee <[email protected]> Co-authored-by: Allen Xu <[email protected]> Co-authored-by: Sean Lee <[email protected]> Co-authored-by: Sean Lee <[email protected]> Co-authored-by: Alessandro Bellina <[email protected]>
[auto-merge] bot-auto-merge-branch-22.10 to branch-22.12 [skip ci] [bot]
Signed-off-by: Allen Xu [email protected]