Skip to content
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

[SPARK-32718][SQL][3.0] Remove unnecessary keywords for interval units #29823

Closed
wants to merge 1 commit into from

Conversation

cloud-fan
Copy link
Contributor

Backport #29560 to 3.0, as it's kind of a bug fix for the ANSI mode. People can't use year, month, etc. functions under ANSI mode.

Remove the YEAR, MONTH, DAY, HOUR, MINUTE, SECOND keywords. They are not useful in the parser, as we need to support plural like YEARS, so the parser has to accept the general identifier as interval unit anyway.

These keywords are reserved in ANSI. If Spark has these keywords, then they become reserved under ANSI mode. This makes Spark not able to run TPCDS queries as they use YEAR as alias name.

No

Added `TPCDSQueryANSISuite`, to make sure Spark with ANSI mode can run TPCDS queries.

Closes apache#29560 from cloud-fan/keyword.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@cloud-fan
Copy link
Contributor Author

@SparkQA
Copy link

SparkQA commented Sep 21, 2020

Test build #128941 has finished for PR 29823 at commit bd54e0a.

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

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM.

dongjoon-hyun pushed a commit that referenced this pull request Sep 21, 2020
Backport #29560 to 3.0, as it's kind of a bug fix for the ANSI mode. People can't use `year`,  `month`, etc. functions under ANSI mode.

Closes #29823 from cloud-fan/backport.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
@maropu
Copy link
Member

maropu commented Sep 23, 2020

late LGTM

holdenk pushed a commit to holdenk/spark that referenced this pull request Oct 27, 2020
Backport apache#29560 to 3.0, as it's kind of a bug fix for the ANSI mode. People can't use `year`,  `month`, etc. functions under ANSI mode.

Closes apache#29823 from cloud-fan/backport.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants