Skip to content

[SPARK-31710][SQL]Add compatibility flag to cast long to timestamp#9

Merged
GuoPhilipse merged 1 commit intomasterfrom
GuoPhilipse-patch-SPARK-31710-4
May 18, 2020
Merged

[SPARK-31710][SQL]Add compatibility flag to cast long to timestamp#9
GuoPhilipse merged 1 commit intomasterfrom
GuoPhilipse-patch-SPARK-31710-4

Conversation

@GuoPhilipse
Copy link
Copy Markdown

What changes were proposed in this pull request?
As we know,long datatype is interpreted as milliseconds when conversion to timestamp in hive, while long is interpreted as seconds when conversion to timestamp in spark, we have been facing error data during migrating hive sql to spark sql. with compatibility flag we can fix this error,

Why are the changes needed?
we have many sqls runing in product, so we need a compatibility flag to make them migrating smoothly ,meanwhile do not change the user behavior in spark.

Does this PR introduce any user-facing change?
if user use this patch ,then user should set this paramter ,
if not, user do not need to do anything.

How was this patch tested?
unit test added

As we know,long datatype is interpreted as milliseconds when conversion to timestamp in hive, while long is interpreted as seconds when conversion to timestamp in spark, we have been facing error data during migrating hive sql to spark sql. with compatibility flag we can fix this error,
@GuoPhilipse GuoPhilipse merged commit d6403d5 into master May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant