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 2021/04/12 12:19:57 UTC
[GitHub] [spark] gengliangwang opened a new pull request #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
gengliangwang opened a new pull request #32129:
URL: https://github.com/apache/spark/pull/32129
<!--
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.
-->
Disallow group by aliases under ANSI mode.
### 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.
-->
As per the ANSI SQL standard secion 7.12 <group by clause>:
>Each <grouping column reference> shall unambiguously reference a column of the table resulting from the <from clause>. A column referenced in a <group by clause> is a grouping column.
By forbidding it, we can avoid ambiguous SQL queries like:
SELECT col + 1 as col FROM t GROUP BY col
### 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'.
-->
Yes, group by aliases is not allowed under ANSI mode.
### 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.
-->
Unit tests
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817812548
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817772014
**[Test build #137212 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137212/testReport)** for PR 32129 at commit [`8c84858`](https://github.com/apache/spark/commit/8c848580cbedc04b39079fb25365ada418e8d5f5).
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-818285488
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/137226/
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817962448
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/137220/
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-818058149
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817962832
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/41800/
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817812547
--
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] gengliangwang commented on a change in pull request #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
gengliangwang commented on a change in pull request #32129:
URL: https://github.com/apache/spark/pull/32129#discussion_r612088024
##########
File path: docs/sql-ref-ansi-compliance.md
##########
@@ -183,6 +183,7 @@ The behavior of some SQL functions can be different under ANSI mode (`spark.sql.
The behavior of some SQL operators can be different under ANSI mode (`spark.sql.ansi.enabled=true`).
- `array_col[index]`: This operator throws `ArrayIndexOutOfBoundsException` if using invalid indices.
- `map_col[key]`: This operator throws `NoSuchElementException` if key does not exist in map.
+ - `GROUP BY`: aliases in a select list can not be used in GROUP BY clauses. Each column referenced in a GROUP BY clause shall unambiguously reference a column of the table resulting from the FROM clause.
Review comment:
Both should work. The second sentence is from the ANSI SQL standard.
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817962448
--
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] HyukjinKwon commented on pull request #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-818384340
Nice!
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817772014
**[Test build #137212 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137212/testReport)** for PR 32129 at commit [`8c84858`](https://github.com/apache/spark/commit/8c848580cbedc04b39079fb25365ada418e8d5f5).
--
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] gengliangwang commented on a change in pull request #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
gengliangwang commented on a change in pull request #32129:
URL: https://github.com/apache/spark/pull/32129#discussion_r611578608
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -206,6 +206,17 @@ object SQLConf {
.intConf
.createWithDefault(100)
+ val ANSI_ENABLED = buildConf("spark.sql.ansi.enabled")
Review comment:
Moving `ANSI_ENABLED` to the front so that other configurations can refer to it without compiling errors.
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817961909
**[Test build #137220 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137220/testReport)** for PR 32129 at commit [`8c84858`](https://github.com/apache/spark/commit/8c848580cbedc04b39079fb25365ada418e8d5f5).
* 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] SparkQA commented on pull request #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817909805
**[Test build #137220 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137220/testReport)** for PR 32129 at commit [`8c84858`](https://github.com/apache/spark/commit/8c848580cbedc04b39079fb25365ada418e8d5f5).
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817909805
**[Test build #137220 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137220/testReport)** for PR 32129 at commit [`8c84858`](https://github.com/apache/spark/commit/8c848580cbedc04b39079fb25365ada418e8d5f5).
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-818285488
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/137226/
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817962777
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817993998
**[Test build #137226 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137226/testReport)** for PR 32129 at commit [`62cee4f`](https://github.com/apache/spark/commit/62cee4f24ed49d9c8f967f82267dbd3f3180c32c).
--
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] gengliangwang commented on pull request #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
gengliangwang commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817768195
There has been some discussion under the PR that supports group by alias: https://github.com/apache/spark/pull/17191
@cloud-fan also mention the issue behind that behavior in https://github.com/apache/spark/pull/27775
Group by aliases is convenient. But it can be ambiguous and incompatible with SQL standard.
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-818282531
**[Test build #137226 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137226/testReport)** for PR 32129 at commit [`62cee4f`](https://github.com/apache/spark/commit/62cee4f24ed49d9c8f967f82267dbd3f3180c32c).
* 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] gengliangwang closed pull request #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
gengliangwang closed pull request #32129:
URL: https://github.com/apache/spark/pull/32129
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-818075810
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/41806/
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817885228
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] AmplabJenkins removed a comment on pull request #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-818075810
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/41806/
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817993998
**[Test build #137226 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137226/testReport)** for PR 32129 at commit [`62cee4f`](https://github.com/apache/spark/commit/62cee4f24ed49d9c8f967f82267dbd3f3180c32c).
--
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] gengliangwang commented on pull request #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
gengliangwang commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-818389727
Merging to master
--
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 #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817800067
**[Test build #137212 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137212/testReport)** for PR 32129 at commit [`8c84858`](https://github.com/apache/spark/commit/8c848580cbedc04b39079fb25365ada418e8d5f5).
* 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] SparkQA commented on pull request #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32129:
URL: https://github.com/apache/spark/pull/32129#issuecomment-817804605
--
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] maropu commented on a change in pull request #32129: [SPARK-35028][SQL] ANSI mode: disallow group by aliases
Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #32129:
URL: https://github.com/apache/spark/pull/32129#discussion_r612007345
##########
File path: docs/sql-ref-ansi-compliance.md
##########
@@ -183,6 +183,7 @@ The behavior of some SQL functions can be different under ANSI mode (`spark.sql.
The behavior of some SQL operators can be different under ANSI mode (`spark.sql.ansi.enabled=true`).
- `array_col[index]`: This operator throws `ArrayIndexOutOfBoundsException` if using invalid indices.
- `map_col[key]`: This operator throws `NoSuchElementException` if key does not exist in map.
+ - `GROUP BY`: aliases in a select list can not be used in GROUP BY clauses. Each column referenced in a GROUP BY clause shall unambiguously reference a column of the table resulting from the FROM clause.
Review comment:
nit: `in a GROUP BY clause` -> `by a GROUP BY clause`?
--
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