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/12/02 06:18:16 UTC
[GitHub] [spark] beliefer opened a new pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
beliefer opened a new pull request #30564:
URL: https://github.com/apache/spark/pull/30564
### What changes were proposed in this pull request?
This PR follows up https://github.com/apache/spark/pull/29497.
Because https://github.com/apache/spark/pull/29497 just give us an example to group all `AnalysisExcpetion` in Analyzer into QueryCompilationErrors.
This PR group other `AnalysisExcpetion` into QueryCompilationErrors.
### Why are the changes needed?
It will largely help with standardization of error messages and its maintenance.
### Does this PR introduce _any_ user-facing change?
No. Error messages remain unchanged.
### How was this patch tested?
No new tests - pass all original tests to make sure it doesn't break any existing behavior.
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738594870
**[Test build #132198 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132198/testReport)** for PR 30564 at commit [`8585306`](https://github.com/apache/spark/commit/85853062ec96f3d06932c5a1ff34932dcd5a2a41).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740624435
**[Test build #132433 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132433/testReport)** for PR 30564 at commit [`d151497`](https://github.com/apache/spark/commit/d151497fccb565c4456b3d06f97a5ad0f02df346).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740671299
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/37033/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741632452
**[Test build #132472 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132472/testReport)** for PR 30564 at commit [`7440dad`](https://github.com/apache/spark/commit/7440dad6639a5c9c005b5e90b0fb9cabd05913db).
* 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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741819862
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132486/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739863443
**[Test build #132362 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132362/testReport)** for PR 30564 at commit [`88c7eb4`](https://github.com/apache/spark/commit/88c7eb47f343f9c8cffa2067cd1b46c24461060b).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741723541
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/37088/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739626623
**[Test build #132316 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132316/testReport)** for PR 30564 at commit [`f62f297`](https://github.com/apache/spark/commit/f62f2979e92cdd52db1c63a029dc6331742666c0).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739839838
**[Test build #132359 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132359/testReport)** for PR 30564 at commit [`4b4780a`](https://github.com/apache/spark/commit/4b4780a2a11da225cb5f2e7e0631bbe6168d2114).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741574516
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/37067/
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535872773
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in expression '$prettyName'")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def filterInAggregateFunctionInvalidError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(
Review comment:
Yeah.
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740567235
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/37025/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739840633
**[Test build #132359 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132359/testReport)** for PR 30564 at commit [`4b4780a`](https://github.com/apache/spark/commit/4b4780a2a11da225cb5f2e7e0631bbe6168d2114).
* This patch **fails Scala style 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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741632878
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132472/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741608352
Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37074/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740651914
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37033/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740487838
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] beliefer commented on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739744448
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738720165
**[Test build #132198 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132198/testReport)** for PR 30564 at commit [`8585306`](https://github.com/apache/spark/commit/85853062ec96f3d06932c5a1ff34932dcd5a2a41).
* 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] SparkQA commented on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738615629
**[Test build #132203 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132203/testReport)** for PR 30564 at commit [`2249e05`](https://github.com/apache/spark/commit/2249e05d88c16932a2aae5488dd8d875bbdd4dae).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738617325
**[Test build #132206 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132206/testReport)** for PR 30564 at commit [`f198e7f`](https://github.com/apache/spark/commit/f198e7f71224bb6d36b61f150d5258c33566a414).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740505711
**[Test build #132425 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132425/testReport)** for PR 30564 at commit [`d151497`](https://github.com/apache/spark/commit/d151497fccb565c4456b3d06f97a5ad0f02df346).
----------------------------------------------------------------
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] beliefer commented on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740363989
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738729753
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738641593
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36804/
----------------------------------------------------------------
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] allisonwang-db commented on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
allisonwang-db commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740889582
The hive thrift server tests seem to have issues: `java.sql.SQLException: Could not open client transport with JDBC Uri: HTTP Response code: 500`
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741723515
Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37088/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739839838
**[Test build #132359 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132359/testReport)** for PR 30564 at commit [`4b4780a`](https://github.com/apache/spark/commit/4b4780a2a11da225cb5f2e7e0631bbe6168d2114).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-737163639
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r537340743
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/package.scala
##########
@@ -42,6 +42,10 @@ package object analysis {
throw new AnalysisException(msg, t.origin.line, t.origin.startPosition)
}
+ def failAnalysis(error: Throwable): Nothing = {
Review comment:
is this method necessary? Can we just let the caller side use throw directly?
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740352713
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132398/
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r537384592
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/package.scala
##########
@@ -42,6 +42,10 @@ package object analysis {
throw new AnalysisException(msg, t.origin.line, t.origin.startPosition)
}
+ def failAnalysis(error: Throwable): Nothing = {
Review comment:
done
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
##########
@@ -50,6 +50,10 @@ trait CheckAnalysis extends PredicateHelper {
throw new AnalysisException(msg)
}
+ protected def failAnalysis(error: Throwable): Nothing = {
+ throw error
Review comment:
done
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739860336
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36958/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740567235
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/37025/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739765059
**[Test build #132346 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132346/testReport)** for PR 30564 at commit [`f62f297`](https://github.com/apache/spark/commit/f62f2979e92cdd52db1c63a029dc6331742666c0).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739879362
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741622883
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/37074/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741632878
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132472/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741562643
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37067/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741570235
**[Test build #132465 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132465/testReport)** for PR 30564 at commit [`d151497`](https://github.com/apache/spark/commit/d151497fccb565c4456b3d06f97a5ad0f02df346).
* 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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739642423
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36916/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-742179891
**[Test build #132527 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132527/testReport)** for PR 30564 at commit [`7440dad`](https://github.com/apache/spark/commit/7440dad6639a5c9c005b5e90b0fb9cabd05913db).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739840651
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132359/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739955300
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132358/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741819862
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132486/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741622883
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/37074/
----------------------------------------------------------------
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 pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
maropu commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741667748
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739840651
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132359/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-737099209
**[Test build #132033 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132033/testReport)** for PR 30564 at commit [`5c80da1`](https://github.com/apache/spark/commit/5c80da13ad8c95c0a328a978e8dd505e614020cd).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739652391
**[Test build #132316 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132316/testReport)** for PR 30564 at commit [`f62f297`](https://github.com/apache/spark/commit/f62f2979e92cdd52db1c63a029dc6331742666c0).
* This patch **fails Spark unit tests**.
* This patch merges cleanly.
* This patch adds the following public classes _(experimental)_:
* `case class StateSchemaNotCompatible(message: String) extends Exception(message)`
* `class StateSchemaCompatibilityChecker(`
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738670704
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/36804/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738670704
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/36804/
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535873098
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in expression '$prettyName'")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def filterInAggregateFunctionInvalidError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(
+ aliasesSize: Int, aliasesNames: String): Throwable = {
+ new AnalysisException("The number of aliases supplied in the AS clause does not " +
+ s"match the number of columns output by the UDTF expected $aliasesSize " +
+ s"aliases but got $aliasesNames ")
+ }
+
+ def windowAggregateFunctionWithFilterNotSupportedError(): Throwable = {
+ new AnalysisException("window aggregate function with filter predicate is not supported yet.")
+ }
+
+ def windowFunctionInsideAggregateFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use a window function inside an aggregate " +
+ "function. Please use the inner window function in a sub-query.")
+ }
+
+ def expressionWithoutWindowExpressionError(expr: NamedExpression): Throwable = {
+ new AnalysisException(s"$expr does not have any WindowExpression.")
+ }
+
+ def expressionWithMultiWindowExpressionError(
Review comment:
OK
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740623535
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132425/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738691395
**[Test build #132203 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132203/testReport)** for PR 30564 at commit [`2249e05`](https://github.com/apache/spark/commit/2249e05d88c16932a2aae5488dd8d875bbdd4dae).
* This patch passes all tests.
* This patch **does not merge 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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740445020
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132407/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741690325
**[Test build #132486 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132486/testReport)** for PR 30564 at commit [`7440dad`](https://github.com/apache/spark/commit/7440dad6639a5c9c005b5e90b0fb9cabd05913db).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-737067283
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739831412
**[Test build #132358 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132358/testReport)** for PR 30564 at commit [`21812d0`](https://github.com/apache/spark/commit/21812d0e89f3411b1ffb5d54223c8ae4c4e252d2).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740657521
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132433/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r537340237
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in expression '$prettyName'")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def filterInAggregateFunctionInvalidError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(
+ aliasesSize: Int, aliasesNames: String): Throwable = {
+ new AnalysisException("The number of aliases supplied in the AS clause does not " +
+ s"match the number of columns output by the UDTF expected $aliasesSize " +
+ s"aliases but got $aliasesNames ")
+ }
+
+ def windowAggregateFunctionWithFilterNotSupportedError(): Throwable = {
+ new AnalysisException("window aggregate function with filter predicate is not supported yet.")
+ }
+
+ def windowFunctionInsideAggregateFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use a window function inside an aggregate " +
+ "function. Please use the inner window function in a sub-query.")
+ }
+
+ def expressionWithoutWindowExpressionError(expr: NamedExpression): Throwable = {
+ new AnalysisException(s"$expr does not have any WindowExpression.")
+ }
+
+ def expressionWithMultiWindowExpressionError(
+ expr: NamedExpression, distinctWindowSpec: Seq[WindowSpecDefinition]): Throwable = {
+ new AnalysisException(s"$expr has multiple Window Specifications ($distinctWindowSpec)." +
+ s"Please file a bug report with this error message, stack trace, and the query.")
+ }
+ def windowFunctionsNotAllowedInsideWhereClauseError(): Throwable = {
+ new AnalysisException("It is not allowed to use window functions inside WHERE clause")
+ }
+
+ def windowFunctionsNotAllowedInsideHavingClauseError(): Throwable = {
Review comment:
ditto
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r539051533
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,166 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writeIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writeIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def invalidStarUsageError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in $prettyName")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def nonDeterministicFilterInAggregateError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+
+ def aliasesNumberNotMatchUDTFOutputError(
+ aliasesSize: Int, aliasesNames: String): Throwable = {
+ new AnalysisException("The number of aliases supplied in the AS clause does not " +
+ s"match the number of columns output by the UDTF expected $aliasesSize " +
+ s"aliases but got $aliasesNames ")
+ }
+
+ def windowAggregateFunctionWithFilterNotSupportedError(): Throwable = {
+ new AnalysisException("window aggregate function with filter predicate is not supported yet.")
+ }
+
+ def windowFunctionInsideAggregateFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use a window function inside an aggregate " +
+ "function. Please use the inner window function in a sub-query.")
+ }
+
+ def expressionWithoutWindowExpressionError(expr: NamedExpression): Throwable = {
+ new AnalysisException(s"$expr does not have any WindowExpression.")
+ }
+
+ def expressionWithMultiWindowExpressionsError(
+ expr: NamedExpression, distinctWindowSpec: Seq[WindowSpecDefinition]): Throwable = {
+ new AnalysisException(s"$expr has multiple Window Specifications ($distinctWindowSpec)." +
+ s"Please file a bug report with this error message, stack trace, and the query.")
Review comment:
Thank you!
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535861761
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
Review comment:
Maybe to distinguish it from v2
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535865994
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
Review comment:
I think this work should be put in the ticket for error message optimization.
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-742203219
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/37129/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741690325
**[Test build #132486 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132486/testReport)** for PR 30564 at commit [`7440dad`](https://github.com/apache/spark/commit/7440dad6639a5c9c005b5e90b0fb9cabd05913db).
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r537983439
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -1484,7 +1476,7 @@ class Analyzer(override val catalogManager: CatalogManager)
}
)
case g: Generate if containsStar(g.generator.children) =>
- failAnalysis("Invalid usage of '*' in explode/json_tuple/UDTF")
+ throw QueryCompilationErrors.invalidStarUsageError(g.generator.prettyName)
Review comment:
Thank you
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739920750
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/36962/
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535865994
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
Review comment:
The parameter very difference.
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740444414
**[Test build #132407 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132407/testReport)** for PR 30564 at commit [`d151497`](https://github.com/apache/spark/commit/d151497fccb565c4456b3d06f97a5ad0f02df346).
* 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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739826280
**[Test build #132346 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132346/testReport)** for PR 30564 at commit [`f62f297`](https://github.com/apache/spark/commit/f62f2979e92cdd52db1c63a029dc6331742666c0).
* This patch **fails Spark unit tests**.
* This patch merges cleanly.
* This patch adds the following public classes _(experimental)_:
* `case class StateSchemaNotCompatible(message: String) extends Exception(message)`
* `class StateSchemaCompatibilityChecker(`
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739626623
**[Test build #132316 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132316/testReport)** for PR 30564 at commit [`f62f297`](https://github.com/apache/spark/commit/f62f2979e92cdd52db1c63a029dc6331742666c0).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738613195
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36800/
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535871073
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in expression '$prettyName'")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def filterInAggregateFunctionInvalidError(): Throwable = {
Review comment:
Good idea.
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-737019310
**[Test build #132023 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132023/testReport)** for PR 30564 at commit [`086bba3`](https://github.com/apache/spark/commit/086bba330ffeba1856e90962872b87a710326631).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738623194
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/36800/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-742370204
thanks, 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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-742203199
Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37129/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740369921
**[Test build #132407 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132407/testReport)** for PR 30564 at commit [`d151497`](https://github.com/apache/spark/commit/d151497fccb565c4456b3d06f97a5ad0f02df346).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739875255
Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36958/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741710769
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37088/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-737064522
**[Test build #132023 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132023/testReport)** for PR 30564 at commit [`086bba3`](https://github.com/apache/spark/commit/086bba330ffeba1856e90962872b87a710326631).
* 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] allisonwang-db commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
allisonwang-db commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r537768880
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -1484,7 +1476,7 @@ class Analyzer(override val catalogManager: CatalogManager)
}
)
case g: Generate if containsStar(g.generator.children) =>
- failAnalysis("Invalid usage of '*' in explode/json_tuple/UDTF")
+ throw QueryCompilationErrors.invalidStarUsageError(g.generator.prettyName)
Review comment:
There is one unit test that matches this error msg: `DataFrameSuite.Star Expansion - ds.explode should fail with a meaningful message if it takes a star`. To avoid changing the error message we can use `invalidStarUsageError("explode/json_tuple/UDTF")` for this one and `invalidStarUsageError(s"expression '${o.prettyName}'")` for the one below.
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,166 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writeIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writeIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def invalidStarUsageError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in expression '$prettyName'")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def nonDeterministicFilterInAggregateError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+
+ def aliasesNumberNotMatchUDTFOutputError(
+ aliasesSize: Int, aliasesNames: String): Throwable = {
+ new AnalysisException("The number of aliases supplied in the AS clause does not " +
+ s"match the number of columns output by the UDTF expected $aliasesSize " +
+ s"aliases but got $aliasesNames ")
+ }
+
+ def windowAggregateFunctionWithFilterNotSupportedError(): Throwable = {
+ new AnalysisException("window aggregate function with filter predicate is not supported yet.")
+ }
+
+ def windowFunctionInsideAggregateFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use a window function inside an aggregate " +
+ "function. Please use the inner window function in a sub-query.")
+ }
+
+ def expressionWithoutWindowExpressionError(expr: NamedExpression): Throwable = {
+ new AnalysisException(s"$expr does not have any WindowExpression.")
+ }
+
+ def expressionWithMultiWindowExpressionsError(
+ expr: NamedExpression, distinctWindowSpec: Seq[WindowSpecDefinition]): Throwable = {
+ new AnalysisException(s"$expr has multiple Window Specifications ($distinctWindowSpec)." +
+ s"Please file a bug report with this error message, stack trace, and the query.")
+ }
+
+ def windowFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use window functions inside WHERE/HAVING clause")
Review comment:
This change breaks the test `DataFrameWindowFunctionsSuite.SPARK-24575: Window functions inside WHERE and HAVING clauses` that matches the keyword "WHERE" only. To avoid change the error message we can add a `clause` parameter.
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738659854
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36804/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739920750
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/36962/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739890139
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535860901
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
Review comment:
OK
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738768528
**[Test build #132227 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132227/testReport)** for PR 30564 at commit [`9fdfffb`](https://github.com/apache/spark/commit/9fdfffb889c4aced6ba4a68ec3a7bbcb170d94a0).
* 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 removed a comment on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-742203219
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/37129/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740358333
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/36999/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738615629
**[Test build #132203 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132203/testReport)** for PR 30564 at commit [`2249e05`](https://github.com/apache/spark/commit/2249e05d88c16932a2aae5488dd8d875bbdd4dae).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741570557
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132465/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740392744
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/37007/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739829643
----------------------------------------------------------------
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] beliefer commented on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-742386256
@cloud-fan Thanks for your work!
@allisonwang-db @maropu Thanks for review.
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738617325
**[Test build #132206 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132206/testReport)** for PR 30564 at commit [`f198e7f`](https://github.com/apache/spark/commit/f198e7f71224bb6d36b61f150d5258c33566a414).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-737163639
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738780311
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535870349
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
Review comment:
I think this work should be put in the ticket for error message optimization. @gatorsmile has already established this ticket.
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738701063
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132203/
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535873821
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
##########
@@ -50,6 +50,10 @@ trait CheckAnalysis extends PredicateHelper {
throw new AnalysisException(msg)
}
+ protected def failAnalysis(t: Throwable): Nothing = {
Review comment:
OK
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/package.scala
##########
@@ -42,6 +42,10 @@ package object analysis {
throw new AnalysisException(msg, t.origin.line, t.origin.startPosition)
}
+ def failAnalysis(t: Throwable): Nothing = {
Review comment:
OK
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738727470
**[Test build #132206 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132206/testReport)** for PR 30564 at commit [`f198e7f`](https://github.com/apache/spark/commit/f198e7f71224bb6d36b61f150d5258c33566a414).
* This patch **fails Spark unit tests**.
* This patch merges cleanly.
* This patch adds the following public classes _(experimental)_:
* `class OneVsRest(Estimator, _OneVsRestParams, HasParallelism, MLReadable, MLWritable):`
* `class OneVsRestReader(MLReader):`
* `class OneVsRestWriter(MLWriter):`
* `class OneVsRestModel(Model, _OneVsRestParams, MLReadable, MLWritable):`
* `class OneVsRestModelReader(MLReader):`
* `class OneVsRestModelWriter(MLWriter):`
* `class CrossValidatorReader(MLReader):`
* `class CrossValidatorWriter(MLWriter):`
* `class CrossValidatorModelReader(MLReader):`
* `class CrossValidatorModelWriter(MLWriter):`
* `class TrainValidationSplitReader(MLReader):`
* `class TrainValidationSplitWriter(MLWriter):`
* `class TrainValidationSplitModelReader(MLReader):`
* `class TrainValidationSplitModelWriter(MLWriter):`
* `case class TemporaryViewRelation(tableMeta: CatalogTable) extends LeafNode `
* `case class CreateNamedStruct(children: Seq[Expression]) extends Expression with NoThrow `
* `case class DateFromUnixDate(child: Expression) extends UnaryExpression`
* `case class UnixDate(child: Expression) extends UnaryExpression`
* `case class UnixSeconds(child: Expression) extends TimestampToLongBase `
* `case class UnixMillis(child: Expression) extends TimestampToLongBase `
* `case class UnixMicros(child: Expression) extends TimestampToLongBase `
* `case class MakeDate(`
* `abstract class LikeAllBase extends MultiLikeBase `
* `abstract class LikeAnyBase extends MultiLikeBase `
* `case class LikeAny(child: Expression, patterns: Seq[UTF8String]) extends LikeAnyBase `
* `case class NotLikeAny(child: Expression, patterns: Seq[UTF8String]) extends LikeAnyBase `
* `class StreamingQueryListenerBus(sparkListenerBus: Option[LiveListenerBus])`
* `class StreamingQueryHistoryServerPlugin extends AppHistoryServerPlugin `
* `class StreamingQueryStatusStore(store: KVStore) `
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739955300
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132358/
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535861339
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
Review comment:
OK
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739650271
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36916/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739809231
Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36946/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740358321
Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36999/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741596396
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37074/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740322655
**[Test build #132398 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132398/testReport)** for PR 30564 at commit [`d151497`](https://github.com/apache/spark/commit/d151497fccb565c4456b3d06f97a5ad0f02df346).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738731434
**[Test build #132227 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132227/testReport)** for PR 30564 at commit [`9fdfffb`](https://github.com/apache/spark/commit/9fdfffb889c4aced6ba4a68ec3a7bbcb170d94a0).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740505711
**[Test build #132425 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132425/testReport)** for PR 30564 at commit [`d151497`](https://github.com/apache/spark/commit/d151497fccb565c4456b3d06f97a5ad0f02df346).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738701063
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132203/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738623176
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36800/
----------------------------------------------------------------
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] beliefer commented on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-742178252
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 removed a comment on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-742179891
**[Test build #132527 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132527/testReport)** for PR 30564 at commit [`7440dad`](https://github.com/apache/spark/commit/7440dad6639a5c9c005b5e90b0fb9cabd05913db).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-742278733
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132527/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738780311
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740657521
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132433/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741574516
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/37067/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741819147
**[Test build #132486 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132486/testReport)** for PR 30564 at commit [`7440dad`](https://github.com/apache/spark/commit/7440dad6639a5c9c005b5e90b0fb9cabd05913db).
* 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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-737019310
**[Test build #132023 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132023/testReport)** for PR 30564 at commit [`086bba3`](https://github.com/apache/spark/commit/086bba330ffeba1856e90962872b87a710326631).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739656174
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741723541
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/37088/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-742194754
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37129/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739890141
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740358333
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/36999/
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535861459
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
Review comment:
OK
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535861041
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
Review comment:
OK
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740322655
**[Test build #132398 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132398/testReport)** for PR 30564 at commit [`d151497`](https://github.com/apache/spark/commit/d151497fccb565c4456b3d06f97a5ad0f02df346).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-737225629
**[Test build #132033 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132033/testReport)** for PR 30564 at commit [`5c80da1`](https://github.com/apache/spark/commit/5c80da13ad8c95c0a328a978e8dd505e614020cd).
* 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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535873586
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in expression '$prettyName'")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def filterInAggregateFunctionInvalidError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(
+ aliasesSize: Int, aliasesNames: String): Throwable = {
+ new AnalysisException("The number of aliases supplied in the AS clause does not " +
+ s"match the number of columns output by the UDTF expected $aliasesSize " +
+ s"aliases but got $aliasesNames ")
+ }
+
+ def windowAggregateFunctionWithFilterNotSupportedError(): Throwable = {
+ new AnalysisException("window aggregate function with filter predicate is not supported yet.")
+ }
+
+ def windowFunctionInsideAggregateFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use a window function inside an aggregate " +
+ "function. Please use the inner window function in a sub-query.")
+ }
+
+ def expressionWithoutWindowExpressionError(expr: NamedExpression): Throwable = {
+ new AnalysisException(s"$expr does not have any WindowExpression.")
+ }
+
+ def expressionWithMultiWindowExpressionError(
+ expr: NamedExpression, distinctWindowSpec: Seq[WindowSpecDefinition]): Throwable = {
+ new AnalysisException(s"$expr has multiple Window Specifications ($distinctWindowSpec)." +
+ s"Please file a bug report with this error message, stack trace, and the query.")
+ }
+ def windowFunctionsNotAllowedInsideWhereClauseError(): Throwable = {
+ new AnalysisException("It is not allowed to use window functions inside WHERE clause")
+ }
+
+ def windowFunctionsNotAllowedInsideHavingClauseError(): Throwable = {
+ new AnalysisException("It is not allowed to use window functions inside HAVING clause")
+ }
+
+ def specifyWindowFrameForFrameLessOffsetWindowFunctionError(prettyName: String): Throwable = {
Review comment:
OK
----------------------------------------------------------------
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] allisonwang-db commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
allisonwang-db commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r537759992
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in expression '$prettyName'")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def filterInAggregateFunctionInvalidError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(
+ aliasesSize: Int, aliasesNames: String): Throwable = {
+ new AnalysisException("The number of aliases supplied in the AS clause does not " +
+ s"match the number of columns output by the UDTF expected $aliasesSize " +
+ s"aliases but got $aliasesNames ")
+ }
+
+ def windowAggregateFunctionWithFilterNotSupportedError(): Throwable = {
+ new AnalysisException("window aggregate function with filter predicate is not supported yet.")
+ }
+
+ def windowFunctionInsideAggregateFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use a window function inside an aggregate " +
+ "function. Please use the inner window function in a sub-query.")
+ }
+
+ def expressionWithoutWindowExpressionError(expr: NamedExpression): Throwable = {
+ new AnalysisException(s"$expr does not have any WindowExpression.")
+ }
+
+ def expressionWithMultiWindowExpressionError(
+ expr: NamedExpression, distinctWindowSpec: Seq[WindowSpecDefinition]): Throwable = {
+ new AnalysisException(s"$expr has multiple Window Specifications ($distinctWindowSpec)." +
+ s"Please file a bug report with this error message, stack trace, and the query.")
+ }
+ def windowFunctionsNotAllowedInsideWhereClauseError(): Throwable = {
+ new AnalysisException("It is not allowed to use window functions inside WHERE clause")
+ }
+
+ def windowFunctionsNotAllowedInsideHavingClauseError(): Throwable = {
Review comment:
Sounds good.
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741542922
**[Test build #132465 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132465/testReport)** for PR 30564 at commit [`d151497`](https://github.com/apache/spark/commit/d151497fccb565c4456b3d06f97a5ad0f02df346).
----------------------------------------------------------------
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] beliefer commented on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740354076
@allisonwang-db The jenkins test case seems cannot connect the hiveserver2
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739765059
**[Test build #132346 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132346/testReport)** for PR 30564 at commit [`f62f297`](https://github.com/apache/spark/commit/f62f2979e92cdd52db1c63a029dc6331742666c0).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739831412
**[Test build #132358 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132358/testReport)** for PR 30564 at commit [`21812d0`](https://github.com/apache/spark/commit/21812d0e89f3411b1ffb5d54223c8ae4c4e252d2).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741574473
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738623194
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/36800/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740352713
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132398/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740671299
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/37033/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739938845
**[Test build #132358 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132358/testReport)** for PR 30564 at commit [`21812d0`](https://github.com/apache/spark/commit/21812d0e89f3411b1ffb5d54223c8ae4c4e252d2).
* 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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740645406
**[Test build #132433 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132433/testReport)** for PR 30564 at commit [`d151497`](https://github.com/apache/spark/commit/d151497fccb565c4456b3d06f97a5ad0f02df346).
* 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 removed a comment on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-737099209
**[Test build #132033 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132033/testReport)** for PR 30564 at commit [`5c80da1`](https://github.com/apache/spark/commit/5c80da13ad8c95c0a328a978e8dd505e614020cd).
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r537984827
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,166 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writeIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writeIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def invalidStarUsageError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in expression '$prettyName'")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def nonDeterministicFilterInAggregateError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+
+ def aliasesNumberNotMatchUDTFOutputError(
+ aliasesSize: Int, aliasesNames: String): Throwable = {
+ new AnalysisException("The number of aliases supplied in the AS clause does not " +
+ s"match the number of columns output by the UDTF expected $aliasesSize " +
+ s"aliases but got $aliasesNames ")
+ }
+
+ def windowAggregateFunctionWithFilterNotSupportedError(): Throwable = {
+ new AnalysisException("window aggregate function with filter predicate is not supported yet.")
+ }
+
+ def windowFunctionInsideAggregateFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use a window function inside an aggregate " +
+ "function. Please use the inner window function in a sub-query.")
+ }
+
+ def expressionWithoutWindowExpressionError(expr: NamedExpression): Throwable = {
+ new AnalysisException(s"$expr does not have any WindowExpression.")
+ }
+
+ def expressionWithMultiWindowExpressionsError(
+ expr: NamedExpression, distinctWindowSpec: Seq[WindowSpecDefinition]): Throwable = {
+ new AnalysisException(s"$expr has multiple Window Specifications ($distinctWindowSpec)." +
+ s"Please file a bug report with this error message, stack trace, and the query.")
+ }
+
+ def windowFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use window functions inside WHERE/HAVING clause")
Review comment:
Thank you
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740382541
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37007/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739793915
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36946/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740445020
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132407/
----------------------------------------------------------------
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] beliefer commented on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738718592
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 removed a comment on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738594870
**[Test build #132198 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132198/testReport)** for PR 30564 at commit [`8585306`](https://github.com/apache/spark/commit/85853062ec96f3d06932c5a1ff34932dcd5a2a41).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738731434
**[Test build #132227 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132227/testReport)** for PR 30564 at commit [`9fdfffb`](https://github.com/apache/spark/commit/9fdfffb889c4aced6ba4a68ec3a7bbcb170d94a0).
----------------------------------------------------------------
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] allisonwang-db commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
allisonwang-db commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535514353
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
Review comment:
expectTableNotTempViewError
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
Review comment:
expectTableOrPermanentViewNotTempViewError
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
Review comment:
writeIntoV1TableNotAllowedError
What is a V1 table here?
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in expression '$prettyName'")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def filterInAggregateFunctionInvalidError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(
Review comment:
This name does not match the error description.
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in expression '$prettyName'")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def filterInAggregateFunctionInvalidError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(
+ aliasesSize: Int, aliasesNames: String): Throwable = {
+ new AnalysisException("The number of aliases supplied in the AS clause does not " +
+ s"match the number of columns output by the UDTF expected $aliasesSize " +
+ s"aliases but got $aliasesNames ")
+ }
+
+ def windowAggregateFunctionWithFilterNotSupportedError(): Throwable = {
+ new AnalysisException("window aggregate function with filter predicate is not supported yet.")
+ }
+
+ def windowFunctionInsideAggregateFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use a window function inside an aggregate " +
+ "function. Please use the inner window function in a sub-query.")
+ }
+
+ def expressionWithoutWindowExpressionError(expr: NamedExpression): Throwable = {
+ new AnalysisException(s"$expr does not have any WindowExpression.")
+ }
+
+ def expressionWithMultiWindowExpressionError(
+ expr: NamedExpression, distinctWindowSpec: Seq[WindowSpecDefinition]): Throwable = {
+ new AnalysisException(s"$expr has multiple Window Specifications ($distinctWindowSpec)." +
+ s"Please file a bug report with this error message, stack trace, and the query.")
+ }
+ def windowFunctionsNotAllowedInsideWhereClauseError(): Throwable = {
+ new AnalysisException("It is not allowed to use window functions inside WHERE clause")
+ }
+
+ def windowFunctionsNotAllowedInsideHavingClauseError(): Throwable = {
Review comment:
Maybe we can combine this error and the one above it into one: `windowFunctionNotAllowedError` with the detailed message.
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in expression '$prettyName'")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def filterInAggregateFunctionInvalidError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(
+ aliasesSize: Int, aliasesNames: String): Throwable = {
+ new AnalysisException("The number of aliases supplied in the AS clause does not " +
+ s"match the number of columns output by the UDTF expected $aliasesSize " +
+ s"aliases but got $aliasesNames ")
+ }
+
+ def windowAggregateFunctionWithFilterNotSupportedError(): Throwable = {
+ new AnalysisException("window aggregate function with filter predicate is not supported yet.")
+ }
+
+ def windowFunctionInsideAggregateFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use a window function inside an aggregate " +
+ "function. Please use the inner window function in a sub-query.")
+ }
+
+ def expressionWithoutWindowExpressionError(expr: NamedExpression): Throwable = {
+ new AnalysisException(s"$expr does not have any WindowExpression.")
+ }
+
+ def expressionWithMultiWindowExpressionError(
+ expr: NamedExpression, distinctWindowSpec: Seq[WindowSpecDefinition]): Throwable = {
+ new AnalysisException(s"$expr has multiple Window Specifications ($distinctWindowSpec)." +
+ s"Please file a bug report with this error message, stack trace, and the query.")
+ }
+ def windowFunctionsNotAllowedInsideWhereClauseError(): Throwable = {
+ new AnalysisException("It is not allowed to use window functions inside WHERE clause")
+ }
+
+ def windowFunctionsNotAllowedInsideHavingClauseError(): Throwable = {
+ new AnalysisException("It is not allowed to use window functions inside HAVING clause")
+ }
+
+ def specifyWindowFrameForFrameLessOffsetWindowFunctionError(prettyName: String): Throwable = {
Review comment:
Maybe `cannotSpecifyWindowFrameError`?
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
Review comment:
insertIntoViewNotAllowedError
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
Review comment:
writeIntoViewNotAllowedError
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
Review comment:
expectTableNotViewError
This one seems to also cover the `expectTableNotTempViewError`. We can combine these two errors.
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
Review comment:
I think this one can be combined with the previous one (starInExplodeOrJsonTupleOrUDTFInvalidError) into an `invalidStarUsageError` with detailed messages.
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in expression '$prettyName'")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def filterInAggregateFunctionInvalidError(): Throwable = {
Review comment:
We might want to emphasize the non-deterministic filter here: `nonDeterministicFilterInAggregateError`
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in expression '$prettyName'")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def filterInAggregateFunctionInvalidError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(
+ aliasesSize: Int, aliasesNames: String): Throwable = {
+ new AnalysisException("The number of aliases supplied in the AS clause does not " +
+ s"match the number of columns output by the UDTF expected $aliasesSize " +
+ s"aliases but got $aliasesNames ")
+ }
+
+ def windowAggregateFunctionWithFilterNotSupportedError(): Throwable = {
+ new AnalysisException("window aggregate function with filter predicate is not supported yet.")
+ }
+
+ def windowFunctionInsideAggregateFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use a window function inside an aggregate " +
+ "function. Please use the inner window function in a sub-query.")
+ }
+
+ def expressionWithoutWindowExpressionError(expr: NamedExpression): Throwable = {
+ new AnalysisException(s"$expr does not have any WindowExpression.")
+ }
+
+ def expressionWithMultiWindowExpressionError(
Review comment:
expressionWithMultiWindowExpressionsError
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
##########
@@ -50,6 +50,10 @@ trait CheckAnalysis extends PredicateHelper {
throw new AnalysisException(msg)
}
+ protected def failAnalysis(t: Throwable): Nothing = {
Review comment:
Maybe use `error` instead of `t` here?
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/package.scala
##########
@@ -42,6 +42,10 @@ package object analysis {
throw new AnalysisException(msg, t.origin.line, t.origin.startPosition)
}
+ def failAnalysis(t: Throwable): Nothing = {
Review comment:
ditto
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740623535
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132425/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740369921
**[Test build #132407 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132407/testReport)** for PR 30564 at commit [`d151497`](https://github.com/apache/spark/commit/d151497fccb565c4456b3d06f97a5ad0f02df346).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741570557
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132465/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741574473
**[Test build #132472 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132472/testReport)** for PR 30564 at commit [`7440dad`](https://github.com/apache/spark/commit/7440dad6639a5c9c005b5e90b0fb9cabd05913db).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740606835
**[Test build #132425 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132425/testReport)** for PR 30564 at commit [`d151497`](https://github.com/apache/spark/commit/d151497fccb565c4456b3d06f97a5ad0f02df346).
* 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] cloud-fan commented on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741532174
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] cloud-fan commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r537340930
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
##########
@@ -50,6 +50,10 @@ trait CheckAnalysis extends PredicateHelper {
throw new AnalysisException(msg)
}
+ protected def failAnalysis(error: Throwable): Nothing = {
+ throw error
Review comment:
ditto
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r535933387
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in expression '$prettyName'")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def filterInAggregateFunctionInvalidError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(
+ aliasesSize: Int, aliasesNames: String): Throwable = {
+ new AnalysisException("The number of aliases supplied in the AS clause does not " +
+ s"match the number of columns output by the UDTF expected $aliasesSize " +
+ s"aliases but got $aliasesNames ")
+ }
+
+ def windowAggregateFunctionWithFilterNotSupportedError(): Throwable = {
+ new AnalysisException("window aggregate function with filter predicate is not supported yet.")
+ }
+
+ def windowFunctionInsideAggregateFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use a window function inside an aggregate " +
+ "function. Please use the inner window function in a sub-query.")
+ }
+
+ def expressionWithoutWindowExpressionError(expr: NamedExpression): Throwable = {
+ new AnalysisException(s"$expr does not have any WindowExpression.")
+ }
+
+ def expressionWithMultiWindowExpressionError(
+ expr: NamedExpression, distinctWindowSpec: Seq[WindowSpecDefinition]): Throwable = {
+ new AnalysisException(s"$expr has multiple Window Specifications ($distinctWindowSpec)." +
+ s"Please file a bug report with this error message, stack trace, and the query.")
+ }
+ def windowFunctionsNotAllowedInsideWhereClauseError(): Throwable = {
+ new AnalysisException("It is not allowed to use window functions inside WHERE clause")
+ }
+
+ def windowFunctionsNotAllowedInsideHavingClauseError(): Throwable = {
Review comment:
I think this work should be put in the ticket for error message optimization.
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-737067283
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-742278733
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132527/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-742267435
**[Test build #132527 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132527/testReport)** for PR 30564 at commit [`7440dad`](https://github.com/apache/spark/commit/7440dad6639a5c9c005b5e90b0fb9cabd05913db).
* 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] SparkQA removed a comment on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740624435
**[Test build #132433 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132433/testReport)** for PR 30564 at commit [`d151497`](https://github.com/apache/spark/commit/d151497fccb565c4456b3d06f97a5ad0f02df346).
----------------------------------------------------------------
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] beliefer removed a comment on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738718592
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740348808
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36999/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-741542922
**[Test build #132465 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132465/testReport)** for PR 30564 at commit [`d151497`](https://github.com/apache/spark/commit/d151497fccb565c4456b3d06f97a5ad0f02df346).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r539050180
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,166 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writeIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writeIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def invalidStarUsageError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in $prettyName")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def nonDeterministicFilterInAggregateError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+
+ def aliasesNumberNotMatchUDTFOutputError(
+ aliasesSize: Int, aliasesNames: String): Throwable = {
+ new AnalysisException("The number of aliases supplied in the AS clause does not " +
+ s"match the number of columns output by the UDTF expected $aliasesSize " +
+ s"aliases but got $aliasesNames ")
+ }
+
+ def windowAggregateFunctionWithFilterNotSupportedError(): Throwable = {
+ new AnalysisException("window aggregate function with filter predicate is not supported yet.")
+ }
+
+ def windowFunctionInsideAggregateFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use a window function inside an aggregate " +
+ "function. Please use the inner window function in a sub-query.")
+ }
+
+ def expressionWithoutWindowExpressionError(expr: NamedExpression): Throwable = {
+ new AnalysisException(s"$expr does not have any WindowExpression.")
+ }
+
+ def expressionWithMultiWindowExpressionsError(
+ expr: NamedExpression, distinctWindowSpec: Seq[WindowSpecDefinition]): Throwable = {
+ new AnalysisException(s"$expr has multiple Window Specifications ($distinctWindowSpec)." +
+ s"Please file a bug report with this error message, stack trace, and the query.")
+ }
+
+ def windowFunctionNotAllowedError(clauseName: String): Throwable = {
+ new AnalysisException(s"It is not allowed to use window functions inside $clauseName clause")
+ }
+
+ def cannotSpecifyWindowFrameError(prettyName: String): Throwable = {
+ new AnalysisException(s"Cannot specify window frame for $prettyName function")
+ }
+
+ def windowFrameNotMatchRequiredFrameError(
+ f: SpecifiedWindowFrame, required: WindowFrame): Throwable = {
+ new AnalysisException(s"Window Frame $f must match the required frame $required")
+ }
+
+ def windowFunctionWithWindowFrameNotOrderedError(wf: WindowFunction): Throwable = {
+ new AnalysisException(s"Window function $wf requires window to be ordered, please add " +
+ s"ORDER BY clause. For example SELECT $wf(value_expr) OVER (PARTITION BY window_partition " +
+ s"ORDER BY window_ordering) from table")
Review comment:
nit: remove `s`
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,166 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writeIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writeIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def invalidStarUsageError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in $prettyName")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def nonDeterministicFilterInAggregateError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+
+ def aliasesNumberNotMatchUDTFOutputError(
+ aliasesSize: Int, aliasesNames: String): Throwable = {
+ new AnalysisException("The number of aliases supplied in the AS clause does not " +
+ s"match the number of columns output by the UDTF expected $aliasesSize " +
+ s"aliases but got $aliasesNames ")
+ }
+
+ def windowAggregateFunctionWithFilterNotSupportedError(): Throwable = {
+ new AnalysisException("window aggregate function with filter predicate is not supported yet.")
+ }
+
+ def windowFunctionInsideAggregateFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use a window function inside an aggregate " +
+ "function. Please use the inner window function in a sub-query.")
+ }
+
+ def expressionWithoutWindowExpressionError(expr: NamedExpression): Throwable = {
+ new AnalysisException(s"$expr does not have any WindowExpression.")
+ }
+
+ def expressionWithMultiWindowExpressionsError(
+ expr: NamedExpression, distinctWindowSpec: Seq[WindowSpecDefinition]): Throwable = {
+ new AnalysisException(s"$expr has multiple Window Specifications ($distinctWindowSpec)." +
+ s"Please file a bug report with this error message, stack trace, and the query.")
Review comment:
nit: remove `s`
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,166 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writeIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writeIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def invalidStarUsageError(prettyName: String): Throwable = {
+ new AnalysisException(s"Invalid usage of '*' in $prettyName")
+ }
+
+ def orderByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"ORDER BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+
+ def groupByPositionRangeError(index: Int, size: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"GROUP BY position $index is not in select list " +
+ s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
+ }
+ def generatorNotExpectedError(name: FunctionIdentifier, classCanonicalName: String): Throwable = {
+ new AnalysisException(s"$name is expected to be a generator. However, " +
+ s"its class is $classCanonicalName, which is not a generator.")
+ }
+ def distinctOrFilterOnlyWithAggregateFunctionError(prettyName: String): Throwable = {
+ new AnalysisException("DISTINCT or FILTER specified, " +
+ s"but $prettyName is not an aggregate function")
+ }
+
+ def nonDeterministicFilterInAggregateError(): Throwable = {
+ new AnalysisException("FILTER expression is non-deterministic, " +
+ "it cannot be used in aggregate functions")
+ }
+
+ def aliasNumberNotMatchColumnNumberError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException("Number of column aliases does not match number of columns. " +
+ s"Number of column aliases: $columnSize; " +
+ s"number of columns: $outputSize.", t.origin.line, t.origin.startPosition)
+ }
+
+ def aliasesNumberNotMatchUDTFOutputError(
+ aliasesSize: Int, aliasesNames: String): Throwable = {
+ new AnalysisException("The number of aliases supplied in the AS clause does not " +
+ s"match the number of columns output by the UDTF expected $aliasesSize " +
+ s"aliases but got $aliasesNames ")
+ }
+
+ def windowAggregateFunctionWithFilterNotSupportedError(): Throwable = {
+ new AnalysisException("window aggregate function with filter predicate is not supported yet.")
+ }
+
+ def windowFunctionInsideAggregateFunctionNotAllowedError(): Throwable = {
+ new AnalysisException("It is not allowed to use a window function inside an aggregate " +
+ "function. Please use the inner window function in a sub-query.")
+ }
+
+ def expressionWithoutWindowExpressionError(expr: NamedExpression): Throwable = {
+ new AnalysisException(s"$expr does not have any WindowExpression.")
+ }
+
+ def expressionWithMultiWindowExpressionsError(
+ expr: NamedExpression, distinctWindowSpec: Seq[WindowSpecDefinition]): Throwable = {
+ new AnalysisException(s"$expr has multiple Window Specifications ($distinctWindowSpec)." +
+ s"Please file a bug report with this error message, stack trace, and the query.")
+ }
+
+ def windowFunctionNotAllowedError(clauseName: String): Throwable = {
+ new AnalysisException(s"It is not allowed to use window functions inside $clauseName clause")
+ }
+
+ def cannotSpecifyWindowFrameError(prettyName: String): Throwable = {
+ new AnalysisException(s"Cannot specify window frame for $prettyName function")
+ }
+
+ def windowFrameNotMatchRequiredFrameError(
+ f: SpecifiedWindowFrame, required: WindowFrame): Throwable = {
+ new AnalysisException(s"Window Frame $f must match the required frame $required")
+ }
+
+ def windowFunctionWithWindowFrameNotOrderedError(wf: WindowFunction): Throwable = {
+ new AnalysisException(s"Window function $wf requires window to be ordered, please add " +
+ s"ORDER BY clause. For example SELECT $wf(value_expr) OVER (PARTITION BY window_partition " +
+ s"ORDER BY window_ordering) from table")
+ }
+
+ def cannotResolveUserSpecifiedColumnsError(col: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot resolve column name $col", t.origin.line, t.origin.startPosition)
+ }
+
+ def writeTableWithMismatchedColumnsError(
+ columnSize: Int, outputSize: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write to table due to mismatched user specified column " +
Review comment:
nit: remove `s`
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739829643
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740392728
Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37007/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740607095
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739863443
**[Test build #132362 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132362/testReport)** for PR 30564 at commit [`88c7eb4`](https://github.com/apache/spark/commit/88c7eb47f343f9c8cffa2067cd1b46c24461060b).
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740671278
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37033/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740347033
**[Test build #132398 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132398/testReport)** for PR 30564 at commit [`d151497`](https://github.com/apache/spark/commit/d151497fccb565c4456b3d06f97a5ad0f02df346).
* 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] beliefer commented on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-737158654
cc @allisonwang-db
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-740392744
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/37007/
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r537340038
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
Review comment:
I don't have a strong opinion about when to do this. If we plan to do it later, @beliefer can you create a JIRA ticket to track it since it's discovered? I'm also OK if you fix it in this PR.
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-737226734
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-737226734
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-739656174
----------------------------------------------------------------
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 #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-738729753
----------------------------------------------------------------
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 closed pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #30564:
URL: https://github.com/apache/spark/pull/30564
----------------------------------------------------------------
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] beliefer commented on pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on pull request #30564:
URL: https://github.com/apache/spark/pull/30564#issuecomment-737722164
cc @cloud-fan @HyukjinKwon @maropu @dongjoon-hyun
----------------------------------------------------------------
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] beliefer commented on a change in pull request #30564: [SPARK-32670][SQL][FOLLOWUP] Group exception messages in Catalyst Analyzer in one file
Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #30564:
URL: https://github.com/apache/spark/pull/30564#discussion_r537369578
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -159,6 +164,174 @@ object QueryCompilationErrors {
s"Couldn't find the reference column for $after at $parentName")
}
-}
+ def windowSpecificationNotDefinedError(windowName: String): Throwable = {
+ new AnalysisException(s"Window specification $windowName is not defined in the WINDOW clause.")
+ }
+
+ def selectExprNotInGroupByError(expr: Expression, groupByAliases: Seq[Alias]): Throwable = {
+ new AnalysisException(s"$expr doesn't show up in the GROUP BY list $groupByAliases")
+ }
+
+ def groupingMustWithGroupingSetsOrCubeOrRollupError(): Throwable = {
+ new AnalysisException("grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup")
+ }
+
+ def pandasUDFAggregateNotSupportedInPivotError(): Throwable = {
+ new AnalysisException("Pandas UDF aggregate expressions are currently not supported in pivot.")
+ }
+
+ def aggregateExpressionRequiredForPivotError(sql: String): Throwable = {
+ new AnalysisException(s"Aggregate expression required for pivot, but '$sql' " +
+ "did not appear in any aggregate function.")
+ }
+
+ def expectedTableNotTempViewError(quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectedTableOrPermanentViewNotTempViewError(
+ quoted: String, cmd: String, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"$quoted is a temp view. '$cmd' expects a table or permanent view.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def viewDepthExceedsMaxResolutionDepthError(
+ identifier: TableIdentifier, maxNestedViewDepth: Int, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"The depth of view $identifier exceeds the maximum " +
+ s"view resolution depth ($maxNestedViewDepth). Analysis is aborted to " +
+ s"avoid errors. Increase the value of ${SQLConf.MAX_NESTED_VIEW_DEPTH.key} to work " +
+ "around this.", t.origin.line, t.origin.startPosition)
+ }
+
+ def insertingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Inserting into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoViewNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Writing into a view is not allowed. View: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def writingIntoV1TableNotAllowedError(identifier: TableIdentifier, t: TreeNode[_]): Throwable = {
+ new AnalysisException(s"Cannot write into v1 table: $identifier.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def expectsTableNotViewError(v: ResolvedView, cmd: String, t: TreeNode[_]): Throwable = {
+ val viewStr = if (v.isTemp) "temp view" else "view"
+ new AnalysisException(s"${v.identifier.quoted} is a $viewStr. '$cmd' expects a table.",
+ t.origin.line, t.origin.startPosition)
+ }
+
+ def starNotAllowedWhenGroupByOrdinalPositionUsedError(): Throwable = {
+ new AnalysisException(
+ "Star (*) is not allowed in select list when GROUP BY ordinal position is used")
+ }
+
+ def starInExplodeOrJsonTupleOrUDTFInvalidError(): Throwable = {
+ new AnalysisException("Invalid usage of '*' in explode/json_tuple/UDTF")
+ }
+
+ def starInExpressionInvalidError(prettyName: String): Throwable = {
Review comment:
OK
----------------------------------------------------------------
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