You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-52848][SQL] Avoid cast to Double in casting TIME/TIMESTAMP to DECIMAL
### What changes were proposed in this pull request?
In the PR, I propose to simplify casting TIME/TIMESTAMP to DECIMAL, and avoid intermediate casting to Double.
### Why are the changes needed?
To avoid unnecessary arithmetic operations and to improve code maintenance.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
By running the affected test suites:
```
$ build/sbt "test:testOnly *CastWithAnsiOnSuite"
$ build/sbt "test:testOnly *CastWithAnsiOffSuite"
$ build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite -- -z cast.sql"
```
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes#51539 from MaxGekk/cast-dec-avoid-double.
Authored-by: Max Gekk <[email protected]>
Signed-off-by: Max Gekk <[email protected]>
0 commit comments