-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-31790][DOCS] cast(long as timestamp) show different result between Hive and Spark #28605
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
Conversation
update masterbranch
|
@GuoPhilipse, let's file a JIRA although it's doc only, it's user-facing. |
|
fine, i will create a JIRA for it. |
|
@HyukjinKwon cast(ts as long) may change to cast(long as timestamp) ? |
|
@GuoPhilipse, feel free to fix the PR title and PR description with examples. It's your PR :-) |
|
:) have corrected and added examples in JIRA |
|
@HyukjinKwon what else did i need to do to close the jira and merge the patch ? |
docs/sql-migration-guide.md
Outdated
| * `SQRT(n)` If n < 0, Hive returns null, Spark SQL returns NaN. | ||
| * `ACOS(n)` If n < -1 or n > 1, Hive returns null, Spark SQL returns NaN. | ||
| * `ASIN(n)` If n < -1 or n > 1, Hive returns null, Spark SQL returns NaN. | ||
| * `CAST(n as timestamp)` If n is Byte/Short/Int/Long data type, Hive treat n as milliseconds unit , while Spark SQL as seconds unit. |
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.
Let's rephrase a bit more:
CAST(n AS TIMESTAMP) If n is integral numbers, Hive treats n as milliseconds, Spark SQL treats n as seconds .
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.
cool , have improved it.
|
ok to test |
|
Test build #122995 has finished for PR 28605 at commit
|
|
Test build #122998 has finished for PR 28605 at commit
|
|
Merged to master and branch-3.0. |
…ween Hive and Spark ### What changes were proposed in this pull request? add docs for sql migration-guide ### Why are the changes needed? let user know more about the cast scenarios in which Hive and Spark generate different results ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? no need to test Closes #28605 from GuoPhilipse/spark-docs. Lead-authored-by: GuoPhilipse <[email protected]> Co-authored-by: GuoPhilipse <[email protected]> Signed-off-by: HyukjinKwon <[email protected]> (cherry picked from commit 892b600) Signed-off-by: HyukjinKwon <[email protected]>
What changes were proposed in this pull request?
add docs for sql migration-guide
Why are the changes needed?
let user know more about the cast scenarios in which Hive and Spark generate different results
Does this PR introduce any user-facing change?
no
How was this patch tested?
no need to test