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/11/05 08:57:54 UTC
[GitHub] [spark] cloud-fan opened a new pull request #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
cloud-fan opened a new pull request #34490:
URL: https://github.com/apache/spark/pull/34490
<!--
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'.
8. If you want to add or modify an error type or message, please read the guideline first in
'core/src/main/resources/error/README.md'.
-->
### 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.
-->
This is a followup of https://github.com/apache/spark/pull/31427 , which introduced two issues:
1. When we lookup `spark_catalog.t`, we failed earlier with `The namespace in session catalog must have exactly one name part` before #31427, now we fail very late in `CheckAnalysis` with `NoSuchTableException`
2. The error message is a bit confusing now. We report `Table t not found` even if table `t` exists.
This PR fixes the 2 issues.
### 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.
-->
save analysis time and improve error message
### 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.
If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
-->
updated test
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 a change in pull request #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34490:
URL: https://github.com/apache/spark/pull/34490#discussion_r751826176
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLParserSuite.scala
##########
@@ -359,6 +359,9 @@ class DDLParserSuite extends AnalysisTest with SharedSparkSession {
false,
LocalTempView)
comparePlans(parsed2, expected2)
+
+ val v3 = "CREATE TEMPORARY VIEW a.b AS SELECT 1"
+ intercept(v3, "It is not allowed to add database prefix")
Review comment:
Im gonna partially revert this change alone for now because other tests seem passing fine.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #34490:
URL: https://github.com/apache/spark/pull/34490#discussion_r743486680
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -2476,22 +2456,6 @@ class DataSourceV2SQLSuite
.head().getString(1) === expectedComment)
}
- test("SPARK-30799: temp view name can't contain catalog name") {
- val sessionCatalogName = CatalogManager.SESSION_CATALOG_NAME
- withTempView("v") {
- spark.range(10).createTempView("v")
- val e1 = intercept[AnalysisException](
- sql(s"CACHE TABLE $sessionCatalogName.v")
Review comment:
This is already tested in https://github.com/apache/spark/pull/34490/files#diff-eeb429a8e3eb55228451c8dbc2fccca044836be608d62e9166561b005030c940R2317
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #34490:
URL: https://github.com/apache/spark/pull/34490#discussion_r743486094
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala
##########
@@ -861,9 +857,9 @@ object QueryCompilationErrors {
new TableAlreadyExistsException(ident)
}
- def requiresSinglePartNamespaceError(ident: Identifier): Throwable = {
- new NoSuchTableException(
- s"V2 session catalog requires a single-part namespace: ${ident.quoted}")
+ def requiresSinglePartNamespaceError(ns: Seq[String]): Throwable = {
+ new AnalysisException(
Review comment:
We can't throw `NoSuchTableException` here. The `CatalogV2Utils.loadTable` swallows `NoSuchTableException` and delays the error to `CheckAnalysis`, and we lost the actual error message.
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -2476,22 +2456,6 @@ class DataSourceV2SQLSuite
.head().getString(1) === expectedComment)
}
- test("SPARK-30799: temp view name can't contain catalog name") {
- val sessionCatalogName = CatalogManager.SESSION_CATALOG_NAME
- withTempView("v") {
- spark.range(10).createTempView("v")
- val e1 = intercept[AnalysisException](
- sql(s"CACHE TABLE $sessionCatalogName.v")
Review comment:
This is already tested in https://github.com/apache/spark/pull/34490/files#diff-eeb429a8e3eb55228451c8dbc2fccca044836be608d62e9166561b005030c940R2317
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -2476,22 +2456,6 @@ class DataSourceV2SQLSuite
.head().getString(1) === expectedComment)
}
- test("SPARK-30799: temp view name can't contain catalog name") {
- val sessionCatalogName = CatalogManager.SESSION_CATALOG_NAME
- withTempView("v") {
- spark.range(10).createTempView("v")
- val e1 = intercept[AnalysisException](
- sql(s"CACHE TABLE $sessionCatalogName.v")
- )
- assert(e1.message.contains(
- "Table or view not found: spark_catalog.v"))
- }
- val e2 = intercept[AnalysisException] {
- sql(s"CREATE TEMP VIEW $sessionCatalogName.v AS SELECT 1")
Review comment:
It's a parser error, I moved the test to https://github.com/apache/spark/pull/34490/files#diff-0db82228a944d6070203b6ac834c3c8d9b16b985fc3ff319ed7408fc3b6a6c23R363
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961866938
**[Test build #144932 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144932/testReport)** for PR 34490 at commit [`deb664d`](https://github.com/apache/spark/commit/deb664db2117a37deb417dafbfc06a26ea4c6393).
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961728244
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-962936584
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/144978/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 a change in pull request #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34490:
URL: https://github.com/apache/spark/pull/34490#discussion_r751830271
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLParserSuite.scala
##########
@@ -359,6 +359,9 @@ class DDLParserSuite extends AnalysisTest with SharedSparkSession {
false,
LocalTempView)
comparePlans(parsed2, expected2)
+
+ val v3 = "CREATE TEMPORARY VIEW a.b AS SELECT 1"
+ intercept(v3, "It is not allowed to add database prefix")
Review comment:
https://github.com/apache/spark/pull/34639
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961728244
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961952461
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49403/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961835264
**[Test build #144926 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144926/testReport)** for PR 34490 at commit [`f634d80`](https://github.com/apache/spark/commit/f634d804149d04e101a49d168d6781c368698db9).
* 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-962788271
**[Test build #144978 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144978/testReport)** for PR 34490 at commit [`3f38d60`](https://github.com/apache/spark/commit/3f38d60a150f915d90a1954d11cc83fb02058947).
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-962834201
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49449/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-962930756
**[Test build #144978 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144978/testReport)** for PR 34490 at commit [`3f38d60`](https://github.com/apache/spark/commit/3f38d60a150f915d90a1954d11cc83fb02058947).
* 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961900123
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49403/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961800853
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-962825896
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49449/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-962834201
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49449/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961728244
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #34490:
URL: https://github.com/apache/spark/pull/34490#discussion_r743486094
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala
##########
@@ -861,9 +857,9 @@ object QueryCompilationErrors {
new TableAlreadyExistsException(ident)
}
- def requiresSinglePartNamespaceError(ident: Identifier): Throwable = {
- new NoSuchTableException(
- s"V2 session catalog requires a single-part namespace: ${ident.quoted}")
+ def requiresSinglePartNamespaceError(ns: Seq[String]): Throwable = {
+ new AnalysisException(
Review comment:
We can't throw `NoSuchTableException` here. The `CatalogV2Utils.loadTable` swallows `NoSuchTableException` and delays the error to `CheckAnalysis`, and we lost the actual 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961800853
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49397/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961866938
**[Test build #144932 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144932/testReport)** for PR 34490 at commit [`deb664d`](https://github.com/apache/spark/commit/deb664db2117a37deb417dafbfc06a26ea4c6393).
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961800853
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 commented on a change in pull request #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #34490:
URL: https://github.com/apache/spark/pull/34490#discussion_r744332509
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala
##########
@@ -861,9 +857,9 @@ object QueryCompilationErrors {
new TableAlreadyExistsException(ident)
}
- def requiresSinglePartNamespaceError(ident: Identifier): Throwable = {
- new NoSuchTableException(
- s"V2 session catalog requires a single-part namespace: ${ident.quoted}")
+ def requiresSinglePartNamespaceError(ns: Seq[String]): Throwable = {
+ new AnalysisException(
+ "spark_catalog requires a single-part namespace, but got " + ns.mkString("[", ", ", "]"))
Review comment:
If you don't mind, can we use `SESSION_CATALOG_NAME` instead of `spark_catalog`?
```scala
- "spark_catalog requires a single-part namespace, but got " + ns.mkString("[", ", ", "]"))
+ s"${SESSION_CATALOG_NAME} requires a single-part namespace, but got " +
+ ns.mkString("[", ", ", "]"))
```
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 a change in pull request #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34490:
URL: https://github.com/apache/spark/pull/34490#discussion_r751825266
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLParserSuite.scala
##########
@@ -359,6 +359,9 @@ class DDLParserSuite extends AnalysisTest with SharedSparkSession {
false,
LocalTempView)
comparePlans(parsed2, expected2)
+
+ val v3 = "CREATE TEMPORARY VIEW a.b AS SELECT 1"
+ intercept(v3, "It is not allowed to add database prefix")
Review comment:
I thought this was an old test so didn't take an action but just noticed that it's pretty new. Probably we should revert this one - seems pretty frequently failing.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-962808874
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49449/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961728477
cc @holdenk @HyukjinKwon @viirya @imback82
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961728244
**[Test build #144926 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144926/testReport)** for PR 34490 at commit [`f634d80`](https://github.com/apache/spark/commit/f634d804149d04e101a49d168d6781c368698db9).
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961728477
cc @holdenk @HyukjinKwon @viirya @imback82
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-962788271
**[Test build #144978 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144978/testReport)** for PR 34490 at commit [`3f38d60`](https://github.com/apache/spark/commit/3f38d60a150f915d90a1954d11cc83fb02058947).
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 a change in pull request #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34490:
URL: https://github.com/apache/spark/pull/34490#discussion_r751825266
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLParserSuite.scala
##########
@@ -359,6 +359,9 @@ class DDLParserSuite extends AnalysisTest with SharedSparkSession {
false,
LocalTempView)
comparePlans(parsed2, expected2)
+
+ val v3 = "CREATE TEMPORARY VIEW a.b AS SELECT 1"
+ intercept(v3, "It is not allowed to add database prefix")
Review comment:
I thought this was an old test so didn't take an action but probably we should revert this one - seems pretty frequently failing.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 commented on pull request #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-962700125
BTW, @cloud-fan . According to the JIRA type, is this targeting only Apache Spark 3.3.0?
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961728244
**[Test build #144926 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144926/testReport)** for PR 34490 at commit [`f634d80`](https://github.com/apache/spark/commit/f634d804149d04e101a49d168d6781c368698db9).
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961800853
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #34490:
URL: https://github.com/apache/spark/pull/34490#discussion_r743486845
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -2476,22 +2456,6 @@ class DataSourceV2SQLSuite
.head().getString(1) === expectedComment)
}
- test("SPARK-30799: temp view name can't contain catalog name") {
- val sessionCatalogName = CatalogManager.SESSION_CATALOG_NAME
- withTempView("v") {
- spark.range(10).createTempView("v")
- val e1 = intercept[AnalysisException](
- sql(s"CACHE TABLE $sessionCatalogName.v")
- )
- assert(e1.message.contains(
- "Table or view not found: spark_catalog.v"))
- }
- val e2 = intercept[AnalysisException] {
- sql(s"CREATE TEMP VIEW $sessionCatalogName.v AS SELECT 1")
Review comment:
It's a parser error, I moved the test to https://github.com/apache/spark/pull/34490/files#diff-0db82228a944d6070203b6ac834c3c8d9b16b985fc3ff319ed7408fc3b6a6c23R363
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961800853
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961763913
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49397/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961835506
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/144926/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-962775556
> is this targeting only Apache Spark 3.3.0?
This just fixes error message, so we don't have to backport. But since the change is small, I think it should be safe to backport to 3.2 at least.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 closed pull request #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #34490:
URL: https://github.com/apache/spark/pull/34490
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-962936584
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/144978/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-962098807
**[Test build #144932 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144932/testReport)** for PR 34490 at commit [`deb664d`](https://github.com/apache/spark/commit/deb664db2117a37deb417dafbfc06a26ea4c6393).
* 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #34490:
URL: https://github.com/apache/spark/pull/34490#discussion_r743486094
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala
##########
@@ -861,9 +857,9 @@ object QueryCompilationErrors {
new TableAlreadyExistsException(ident)
}
- def requiresSinglePartNamespaceError(ident: Identifier): Throwable = {
- new NoSuchTableException(
- s"V2 session catalog requires a single-part namespace: ${ident.quoted}")
+ def requiresSinglePartNamespaceError(ns: Seq[String]): Throwable = {
+ new AnalysisException(
Review comment:
We can't throw `NoSuchTableException` here. The `CatalogV2Utils.loadTable` swallows `NoSuchTableException` and delays the error to `CheckAnalysis`, and we lost the actual error message.
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -2476,22 +2456,6 @@ class DataSourceV2SQLSuite
.head().getString(1) === expectedComment)
}
- test("SPARK-30799: temp view name can't contain catalog name") {
- val sessionCatalogName = CatalogManager.SESSION_CATALOG_NAME
- withTempView("v") {
- spark.range(10).createTempView("v")
- val e1 = intercept[AnalysisException](
- sql(s"CACHE TABLE $sessionCatalogName.v")
Review comment:
This is already tested in https://github.com/apache/spark/pull/34490/files#diff-eeb429a8e3eb55228451c8dbc2fccca044836be608d62e9166561b005030c940R2317
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -2476,22 +2456,6 @@ class DataSourceV2SQLSuite
.head().getString(1) === expectedComment)
}
- test("SPARK-30799: temp view name can't contain catalog name") {
- val sessionCatalogName = CatalogManager.SESSION_CATALOG_NAME
- withTempView("v") {
- spark.range(10).createTempView("v")
- val e1 = intercept[AnalysisException](
- sql(s"CACHE TABLE $sessionCatalogName.v")
- )
- assert(e1.message.contains(
- "Table or view not found: spark_catalog.v"))
- }
- val e2 = intercept[AnalysisException] {
- sql(s"CREATE TEMP VIEW $sessionCatalogName.v AS SELECT 1")
Review comment:
It's a parser error, I moved the test to https://github.com/apache/spark/pull/34490/files#diff-0db82228a944d6070203b6ac834c3c8d9b16b985fc3ff319ed7408fc3b6a6c23R363
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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] imback82 commented on a change in pull request #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #34490:
URL: https://github.com/apache/spark/pull/34490#discussion_r744076058
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala
##########
@@ -1718,8 +1718,7 @@ abstract class DDLSuite extends QueryTest with SQLTestUtils {
val message = intercept[AnalysisException] {
sql("SHOW COLUMNS IN tbl FROM a.b.c")
}.getMessage
- assert(message.contains(
- "Table or view not found: a.b.c.tbl"))
+ assert(message.contains("requires a single-part namespace"))
Review comment:
Hmm, this could be a little misleading since this sounds like `SHOW COLUMNS IN` is only supported for the session catalog? (although it is currently not supported for v2 catalogs.) This may be OK until we start supporting this command for v2 catalogs.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 a change in pull request #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34490:
URL: https://github.com/apache/spark/pull/34490#discussion_r751824750
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLParserSuite.scala
##########
@@ -359,6 +359,9 @@ class DDLParserSuite extends AnalysisTest with SharedSparkSession {
false,
LocalTempView)
comparePlans(parsed2, expected2)
+
+ val v3 = "CREATE TEMPORARY VIEW a.b AS SELECT 1"
+ intercept(v3, "It is not allowed to add database prefix")
Review comment:
@cloud-fan, seems like this test is flaky:
https://github.com/apache/spark/runs/4209199644
https://github.com/apache/spark/runs/4235793982
https://github.com/apache/spark/runs/4223996038
See also SPARK-37308
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961728477
cc @holdenk @HyukjinKwon @viirya @imback82
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-962100353
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/144932/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961728244
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-962100353
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/144932/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961800823
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49397/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-961946879
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49403/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34490: [SPARK-37214][SQL] Fail query analysis earlier with invalid identifiers
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #34490:
URL: https://github.com/apache/spark/pull/34490#issuecomment-962827316
thanks for review, merging to master/3.2!
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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