You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/08/27 15:50:46 UTC
[GitHub] [spark] cloud-fan opened a new pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
cloud-fan opened a new pull request #29560:
URL: https://github.com/apache/spark/pull/29560
<!--
Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
4. Be sure to keep the PR description updated to reflect all changes.
5. Please write your PR title to summarize what this PR proposes.
6. If possible, provide a concise example to reproduce the issue for a faster review.
7. If you want to add a new configuration, please read the guideline first for naming configurations in
'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
-->
### What changes were proposed in this pull request?
<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
2. If you fix some SQL features, you can provide some references of other DBMSes.
3. If there is design documentation, please add the link.
4. If there is a discussion in the mailing list, please add the link.
-->
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.
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
-->
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.
### Does this PR introduce _any_ user-facing change?
<!--
Note that it means *any* user-facing change including all aspects such as the documentation fix.
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
If no, write 'No'.
-->
No
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->
Added `TPCDSQueryANSISuite`, to make sure Spark with ANSI mode can run TPCDS queries.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682035579
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on a change in pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29560:
URL: https://github.com/apache/spark/pull/29560#discussion_r478581809
##########
File path: sql/core/src/test/resources/sql-tests/results/ansi/interval.sql.out
##########
@@ -655,41 +657,63 @@ select interval (-30) day
-- !query schema
struct<>
-- !query output
-org.apache.spark.sql.catalyst.parser.ParseException
+org.apache.spark.sql.AnalysisException
+Undefined function: 'interval'. This function is neither a registered temporary function nor a permanent function registered in the database 'default'.; line 1 pos 7
Review comment:
ditto, it's better to make `day` and `days` have consistent behavior/error message.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682675024
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682086894
**[Test build #127963 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127963/testReport)** for PR 29560 at commit [`1c8610e`](https://github.com/apache/spark/commit/1c8610ecd38790b50cb679d61784a2d96a281b3a).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-683102824
**[Test build #127995 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127995/testReport)** for PR 29560 at commit [`264e48d`](https://github.com/apache/spark/commit/264e48d71500ca9252191600c17cda1212d3ca4d).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682162935
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/127963/
Test FAILed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682323476
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682323176
**[Test build #127981 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127981/testReport)** for PR 29560 at commit [`264e48d`](https://github.com/apache/spark/commit/264e48d71500ca9252191600c17cda1212d3ca4d).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682365714
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/127981/
Test FAILed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] viirya commented on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
viirya commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682668208
retest this please
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682323176
**[Test build #127981 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127981/testReport)** for PR 29560 at commit [`264e48d`](https://github.com/apache/spark/commit/264e48d71500ca9252191600c17cda1212d3ca4d).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682034632
cc @maropu @viirya
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-683106250
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682671765
**[Test build #127995 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127995/testReport)** for PR 29560 at commit [`264e48d`](https://github.com/apache/spark/commit/264e48d71500ca9252191600c17cda1212d3ca4d).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682035579
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682086894
**[Test build #127963 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127963/testReport)** for PR 29560 at commit [`1c8610e`](https://github.com/apache/spark/commit/1c8610ecd38790b50cb679d61784a2d96a281b3a).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun closed pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #29560:
URL: https://github.com/apache/spark/pull/29560
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on a change in pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29560:
URL: https://github.com/apache/spark/pull/29560#discussion_r478556798
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/TPCDSQuerySuite.scala
##########
@@ -65,3 +67,8 @@ class TPCDSQuerySuite extends BenchmarkQueryTest with TPCDSBase {
class TPCDSQueryWithStatsSuite extends TPCDSQuerySuite {
override def injectStats: Boolean = true
}
+
+class TPCDSQueryANSISuite extends TPCDSQuerySuite {
+ override protected def sparkConf: SparkConf =
+ super.sparkConf.set(SQLConf.ANSI_ENABLED, true)
+}
Review comment:
It's the motivation, but the reason is these keywords are useless.
> users can still run TPCDS by turning off ANSI mode
Yes, but they can't with ANSI mode, isn't it a problem of ANSI mode?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] viirya commented on a change in pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #29560:
URL: https://github.com/apache/spark/pull/29560#discussion_r478549313
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/TPCDSQuerySuite.scala
##########
@@ -65,3 +67,8 @@ class TPCDSQuerySuite extends BenchmarkQueryTest with TPCDSBase {
class TPCDSQueryWithStatsSuite extends TPCDSQuerySuite {
override def injectStats: Boolean = true
}
+
+class TPCDSQueryANSISuite extends TPCDSQuerySuite {
+ override protected def sparkConf: SparkConf =
+ super.sparkConf.set(SQLConf.ANSI_ENABLED, true)
+}
Review comment:
Is this the only reason to remove these keywords? Currently users can still run TPCDS by turning off ANSI mode, right?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682365578
**[Test build #127981 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127981/testReport)** for PR 29560 at commit [`264e48d`](https://github.com/apache/spark/commit/264e48d71500ca9252191600c17cda1212d3ca4d).
* This patch **fails due to an unknown error code, -9**.
* This patch merges cleanly.
* This patch adds no public classes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] viirya commented on a change in pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #29560:
URL: https://github.com/apache/spark/pull/29560#discussion_r478692673
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/TPCDSQuerySuite.scala
##########
@@ -65,3 +67,8 @@ class TPCDSQuerySuite extends BenchmarkQueryTest with TPCDSBase {
class TPCDSQueryWithStatsSuite extends TPCDSQuerySuite {
override def injectStats: Boolean = true
}
+
+class TPCDSQueryANSISuite extends TPCDSQuerySuite {
+ override protected def sparkConf: SparkConf =
+ super.sparkConf.set(SQLConf.ANSI_ENABLED, true)
+}
Review comment:
It sounds not a problem of ANSI mode or these queries. I think these queries just conflict with ANSI mode. To unblock TPCDS under ANSI mode, the change is okay.
The concern I have is that if we will remove more keywords from ANSI mode like this, then is ANSI mode still be necessary? This might be a rare case and the concern maybe not valid.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682087440
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682365705
Merged build finished. Test FAILed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682365705
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on a change in pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29560:
URL: https://github.com/apache/spark/pull/29560#discussion_r478826919
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/TPCDSQuerySuite.scala
##########
@@ -65,3 +67,8 @@ class TPCDSQuerySuite extends BenchmarkQueryTest with TPCDSBase {
class TPCDSQueryWithStatsSuite extends TPCDSQuerySuite {
override def injectStats: Boolean = true
}
+
+class TPCDSQueryANSISuite extends TPCDSQuerySuite {
+ override protected def sparkConf: SparkConf =
+ super.sparkConf.set(SQLConf.ANSI_ENABLED, true)
+}
Review comment:
I interpret ANSI mode as a better SQL dialect of Spark, which is ANSI compliant but not 100% the same as the ANSI standard. No database is 100% the same as ANSI, there are always extensions, e.g. unreserve some reserved keywords for better usability.
If a vector builds a product with spark on ANSI mode, and can't run TPCDS queries, I think the ANSI mode is problematic.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682162926
Merged build finished. Test FAILed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682671765
**[Test build #127995 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127995/testReport)** for PR 29560 at commit [`264e48d`](https://github.com/apache/spark/commit/264e48d71500ca9252191600c17cda1212d3ca4d).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682054334
**[Test build #127958 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127958/testReport)** for PR 29560 at commit [`36f96cb`](https://github.com/apache/spark/commit/36f96cbbebb1c138154c8eac96f4322ebbcc8799).
* This patch **fails Spark unit tests**.
* This patch merges cleanly.
* This patch adds no public classes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682162926
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on a change in pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29560:
URL: https://github.com/apache/spark/pull/29560#discussion_r478826919
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/TPCDSQuerySuite.scala
##########
@@ -65,3 +67,8 @@ class TPCDSQuerySuite extends BenchmarkQueryTest with TPCDSBase {
class TPCDSQueryWithStatsSuite extends TPCDSQuerySuite {
override def injectStats: Boolean = true
}
+
+class TPCDSQueryANSISuite extends TPCDSQuerySuite {
+ override protected def sparkConf: SparkConf =
+ super.sparkConf.set(SQLConf.ANSI_ENABLED, true)
+}
Review comment:
I interpret ANSI mode as a better SQL dialect of Spark, which is ANSI compliant but not 100% the same as the ANSI standard. No database is 100% the same as ANSI, there are always extensions, e.g. unreserve some reserved keywords for better usability.
If a vendor builds a product with spark on ANSI mode, and can't run TPCDS queries, I think the ANSI mode is problematic.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682034862
**[Test build #127958 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127958/testReport)** for PR 29560 at commit [`36f96cb`](https://github.com/apache/spark/commit/36f96cbbebb1c138154c8eac96f4322ebbcc8799).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-683106250
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682675024
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on a change in pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29560:
URL: https://github.com/apache/spark/pull/29560#discussion_r478581278
##########
File path: sql/core/src/test/resources/sql-tests/results/ansi/interval.sql.out
##########
@@ -355,15 +355,17 @@ struct<INTERVAL '40 minutes 32 seconds':interval>
-- !query
select interval 30 day day
-- !query schema
-struct<>
+struct<day:interval>
-- !query output
-org.apache.spark.sql.catalyst.parser.ParseException
+30 days
Review comment:
This is a positive change. It's pretty weird that `30 days days` works but `30 day day` does not, under ANSI mode.
In general, this PR makes things more lenient.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682054638
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/127958/
Test FAILed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682087440
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682054632
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682034862
**[Test build #127958 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127958/testReport)** for PR 29560 at commit [`36f96cb`](https://github.com/apache/spark/commit/36f96cbbebb1c138154c8eac96f4322ebbcc8799).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682054632
Merged build finished. Test FAILed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682323476
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #29560: [SPARK-32718][SQL] remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29560:
URL: https://github.com/apache/spark/pull/29560#issuecomment-682162492
**[Test build #127963 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127963/testReport)** for PR 29560 at commit [`1c8610e`](https://github.com/apache/spark/commit/1c8610ecd38790b50cb679d61784a2d96a281b3a).
* This patch **fails Spark unit tests**.
* This patch merges cleanly.
* This patch adds no public classes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] viirya commented on a change in pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #29560:
URL: https://github.com/apache/spark/pull/29560#discussion_r478848811
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/TPCDSQuerySuite.scala
##########
@@ -65,3 +67,8 @@ class TPCDSQuerySuite extends BenchmarkQueryTest with TPCDSBase {
class TPCDSQueryWithStatsSuite extends TPCDSQuerySuite {
override def injectStats: Boolean = true
}
+
+class TPCDSQueryANSISuite extends TPCDSQuerySuite {
+ override protected def sparkConf: SparkConf =
+ super.sparkConf.set(SQLConf.ANSI_ENABLED, true)
+}
Review comment:
Ok, I think this has a good reason to remove them. LGTM.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on a change in pull request #29560: [SPARK-32718][SQL] Remove unnecessary keywords for interval units
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29560:
URL: https://github.com/apache/spark/pull/29560#discussion_r478828191
##########
File path: sql/core/src/test/resources/sql-tests/results/ansi/datetime.sql.out
##########
@@ -199,15 +199,9 @@ struct<weekday(CAST(2007-02-03 AS DATE)):int,weekday(CAST(2009-07-30 AS DATE)):i
-- !query
select year('1500-01-01'), month('1500-01-01'), dayOfYear('1500-01-01')
-- !query schema
-struct<>
+struct<year(CAST(1500-01-01 AS DATE)):int,month(CAST(1500-01-01 AS DATE)):int,dayofyear(CAST(1500-01-01 AS DATE)):int>
-- !query output
-org.apache.spark.sql.catalyst.parser.ParseException
-
-no viable alternative at input 'year'(line 1, pos 7)
-
-== SQL ==
-select year('1500-01-01'), month('1500-01-01'), dayOfYear('1500-01-01')
Review comment:
This is another bad case: with ansi mode some builtin functions become unusable.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org