Skip to content

Conversation

@cloud-fan
Copy link
Contributor

@cloud-fan cloud-fan commented Jan 2, 2020

What changes were proposed in this pull request?

Revert #20433 .

Why are the changes needed?

According to the SQL standard, the INTERVAL prefix is required:

<interval literal> ::=
  INTERVAL [ <sign> ] <interval string> <interval qualifier>

<interval string> ::=
  <quote> <unquoted interval string> <quote>

Does this PR introduce any user-facing change?

yes, but omitting the INTERVAL prefix is a new feature in 3.0

How was this patch tested?

existing tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cloud-fan
Copy link
Contributor Author

cc @maropu @gatorsmile

@SparkQA
Copy link

SparkQA commented Jan 2, 2020

Test build #116048 has finished for PR 27080 at commit 01d134b.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 2, 2020

Test build #116050 has finished for PR 27080 at commit ee86c8a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Member

@maropu maropu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me if the tests passed.

select (-30) day;
select (a + 1) day;
select 30 day day day; No newline at end of file
--IMPORT interval.sql No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need this test file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea, the overflow behavior is different.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, we should have a comment to explain why we need this file.

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine if tests pass

@HyukjinKwon HyukjinKwon changed the title revert [SPARK-23264][SQL] Make INTERVAL keyword optional when ANSI enabled Revert "[SPARK-23264][SQL] Make INTERVAL keyword optional when ANSI enabled" Jan 3, 2020
@yaooqinn
Copy link
Member

yaooqinn commented Jan 3, 2020

LGTM

@SparkQA
Copy link

SparkQA commented Jan 3, 2020

Test build #116064 has finished for PR 27080 at commit 87289cb.

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

@SparkQA
Copy link

SparkQA commented Jan 3, 2020

Test build #116077 has finished for PR 27080 at commit d22635f.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Jan 3, 2020

Test build #116083 has finished for PR 27080 at commit 305b9e3.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 3, 2020

Test build #116095 has finished for PR 27080 at commit 91a0e33.

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

@gatorsmile gatorsmile closed this in be4faaf Jan 3, 2020
@gatorsmile
Copy link
Member

Thanks! Merged to master.

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.

8 participants