Skip to content

Conversation

@MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Sep 6, 2019

What changes were proposed in this pull request?

In the PR, I propose to resolve the time zone before inlining tables in the Analyzer. The former rules uses Cast there:


which can require the time zone in some cases.

For example, SQLQueryTestSuite/window.sql failed here #25708 (comment) because of the reason with the error:

Error in query: failed to evaluate expression CAST('2017-08-01' AS DATE): None.get; line 1 pos 59

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

Tested in the PR #25708 on the query:

spark-sql> CREATE OR REPLACE TEMPORARY VIEW testData AS SELECT * FROM VALUES 
         > (null, 1L, 1.0D, date("2017-08-01"), timestamp(1501545600), "a")
         > AS testData(val, val_long, val_double, val_date, val_timestamp, cate);

@SparkQA
Copy link

SparkQA commented Sep 6, 2019

Test build #110243 has finished for PR 25711 at commit 8b20455.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@MaxGekk
Copy link
Member Author

MaxGekk commented Sep 6, 2019

Time zone can be requested from Cast, see 6da7905

@MaxGekk MaxGekk closed this Sep 6, 2019
@MaxGekk MaxGekk deleted the timezone-before-inline-tables branch October 15, 2019 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants