You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/17 18:56:17 UTC

[GitHub] [spark] MaxGekk opened a new pull request #31872: [SPARK-34737][SQL][3.1] Cast input float to double in `TIMESTAMP_SECONDS`

MaxGekk opened a new pull request #31872:
URL: https://github.com/apache/spark/pull/31872


   ### What changes were proposed in this pull request?
   In the PR, I propose to cast the input float to double in the `SecondsToTimestamp` expression in the same way as in the `Cast` expression.
   
   ### Why are the changes needed?
   To have the same results from `CAST(<float> AS TIMESTAMP)` and from `TIMESTAMP_SECONDS`:
   ```sql
   spark-sql> SELECT CAST(16777215.0f AS TIMESTAMP);
   1970-07-14 07:20:15
   spark-sql> SELECT TIMESTAMP_SECONDS(16777215.0f);
   1970-07-14 07:20:14.951424
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   Yes. After the changes:
   ```sql
   spark-sql> SELECT TIMESTAMP_SECONDS(16777215.0f);
   1970-07-14 07:20:15
   ```
   
   ### How was this patch tested?
   By running new test:
   ```
   $ build/sbt "test:testOnly *DateExpressionsSuite"
   ```
   
   Authored-by: Max Gekk <ma...@gmail.com>
   Signed-off-by: HyukjinKwon <gu...@apache.org>
   (cherry picked from commit 7aaed76125c82aff8683fe319f8047c2cb87afdd)
   Signed-off-by: Max Gekk <ma...@gmail.com>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on pull request #31872: [SPARK-34737][SQL][3.1] Cast input float to double in `TIMESTAMP_SECONDS`

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #31872:
URL: https://github.com/apache/spark/pull/31872#issuecomment-801586751


   thanks, merging to 3.1!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #31872: [SPARK-34737][SQL][3.1] Cast input float to double in `TIMESTAMP_SECONDS`

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31872:
URL: https://github.com/apache/spark/pull/31872#issuecomment-801374973






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan closed pull request #31872: [SPARK-34737][SQL][3.1] Cast input float to double in `TIMESTAMP_SECONDS`

Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #31872:
URL: https://github.com/apache/spark/pull/31872


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org