You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "beliefer (via GitHub)" <gi...@apache.org> on 2023/06/06 10:41:42 UTC
[GitHub] [spark] beliefer opened a new pull request, #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
beliefer opened a new pull request, #41476:
URL: https://github.com/apache/spark/pull/41476
### What changes were proposed in this pull request?
The pr aims to assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437].
### Why are the changes needed?
Improve the error framework.
### Does this PR introduce _any_ user-facing change?
'No'.
### How was this patch tested?
Exists test cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] beliefer commented on pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #41476:
URL: https://github.com/apache/spark/pull/41476#issuecomment-1595972300
ping @MaxGekk The GA failure is unrelate to 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on a diff in pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #41476:
URL: https://github.com/apache/spark/pull/41476#discussion_r1234930632
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala:
##########
@@ -673,9 +673,11 @@ trait CheckAnalysis extends PredicateHelper with LookupCatalog with QueryErrorsB
}
case p @ Project(exprs, _) if containsMultipleGenerators(exprs) =>
- p.failAnalysis(
- errorClass = "_LEGACY_ERROR_TEMP_2433",
- messageParameters = Map("sqlExprs" -> exprs.map(_.sql).mkString(",")))
+ throw SparkException.internalError(
+ msg = "Only a single table generating function is allowed in a SELECT clause, " +
Review Comment:
is this really internal? does the analyzer split `select explode(...), explode(...) ...` into two Projects?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] beliefer commented on pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #41476:
URL: https://github.com/apache/spark/pull/41476#issuecomment-1591186730
ping @MaxGekk
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] MaxGekk commented on a diff in pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on code in PR #41476:
URL: https://github.com/apache/spark/pull/41476#discussion_r1233958778
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala:
##########
@@ -787,8 +787,70 @@ class AnalysisErrorSuite extends AnalysisTest {
val error = intercept[AnalysisException] {
SimpleAnalyzer.checkAnalysis(join)
}
- assert(error.message.contains("Failure when resolving conflicting references in Join"))
- assert(error.message.contains("Conflicting attributes"))
+ checkError(
+ exception = error,
+ errorClass = "RESOLVED_PLAN_HAVE_CONFLICTING_ATTRS",
+ parameters = Map(
+ "nodeName" -> "Join",
+ "plan" -> "'Join Cross\n:- LocalRelation <empty>, [a#0]\n+- LocalRelation <empty>, [a#0]\n",
+ "conflictingAttributes" -> "\"a\""
+ )
+ )
+ }
+
+ test("error test for self-intersect") {
+ val intersect = Intersect(testRelation, testRelation, true)
+ val error = intercept[AnalysisException] {
+ SimpleAnalyzer.checkAnalysis(intersect)
Review Comment:
cc @cloud-fan Just to double check that the errors are internal.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] beliefer commented on pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #41476:
URL: https://github.com/apache/spark/pull/41476#issuecomment-1605875836
ping @MaxGekk Rebased.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] MaxGekk commented on a diff in pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on code in PR #41476:
URL: https://github.com/apache/spark/pull/41476#discussion_r1219462118
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1883,6 +1883,13 @@
],
"sqlState" : "42K05"
},
+ "RESOLVED_PLAN_HAVE_CONFLICTING_ATTRS" : {
Review Comment:
Can you trigger this errors from user space? Could you add some tests, 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] MaxGekk commented on pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #41476:
URL: https://github.com/apache/spark/pull/41476#issuecomment-1610757136
+1, LGTM. Merging to master.
Thank you, @beliefer and @cloud-fan 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] beliefer commented on a diff in pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #41476:
URL: https://github.com/apache/spark/pull/41476#discussion_r1233999456
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala:
##########
@@ -781,11 +781,43 @@ class AnalysisErrorSuite extends AnalysisTest {
test("error test for self-join") {
val join = Join(testRelation, testRelation, Cross, None, JoinHint.NONE)
- val error = intercept[AnalysisException] {
+ val error = intercept[SparkException] {
SimpleAnalyzer.checkAnalysis(join)
}
- assert(error.message.contains("Failure when resolving conflicting references in Join"))
- assert(error.message.contains("Conflicting attributes"))
+ assert(error.getMessage.contains("Failure when resolving conflicting references in Join"))
Review Comment:
I see.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] beliefer commented on a diff in pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #41476:
URL: https://github.com/apache/spark/pull/41476#discussion_r1223008883
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala:
##########
@@ -787,8 +787,70 @@ class AnalysisErrorSuite extends AnalysisTest {
val error = intercept[AnalysisException] {
SimpleAnalyzer.checkAnalysis(join)
}
- assert(error.message.contains("Failure when resolving conflicting references in Join"))
- assert(error.message.contains("Conflicting attributes"))
+ checkError(
+ exception = error,
+ errorClass = "RESOLVED_PLAN_HAVE_CONFLICTING_ATTRS",
+ parameters = Map(
+ "nodeName" -> "Join",
+ "plan" -> "'Join Cross\n:- LocalRelation <empty>, [a#0]\n+- LocalRelation <empty>, [a#0]\n",
+ "conflictingAttributes" -> "\"a\""
+ )
+ )
+ }
+
+ test("error test for self-intersect") {
+ val intersect = Intersect(testRelation, testRelation, true)
+ val error = intercept[AnalysisException] {
+ SimpleAnalyzer.checkAnalysis(intersect)
Review Comment:
@MaxGekk Do you have any suggestion ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] beliefer commented on a diff in pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #41476:
URL: https://github.com/apache/spark/pull/41476#discussion_r1219595776
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala:
##########
@@ -787,8 +787,70 @@ class AnalysisErrorSuite extends AnalysisTest {
val error = intercept[AnalysisException] {
SimpleAnalyzer.checkAnalysis(join)
}
- assert(error.message.contains("Failure when resolving conflicting references in Join"))
- assert(error.message.contains("Conflicting attributes"))
+ checkError(
+ exception = error,
+ errorClass = "RESOLVED_PLAN_HAVE_CONFLICTING_ATTRS",
+ parameters = Map(
+ "nodeName" -> "Join",
+ "plan" -> "'Join Cross\n:- LocalRelation <empty>, [a#0]\n+- LocalRelation <empty>, [a#0]\n",
+ "conflictingAttributes" -> "\"a\""
+ )
+ )
+ }
+
+ test("error test for self-intersect") {
+ val intersect = Intersect(testRelation, testRelation, true)
+ val error = intercept[AnalysisException] {
+ SimpleAnalyzer.checkAnalysis(intersect)
Review Comment:
@MaxGekk I created test cases use `SimpleAnalyzer.checkAnalysis` 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] beliefer commented on a diff in pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #41476:
URL: https://github.com/apache/spark/pull/41476#discussion_r1235016542
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala:
##########
@@ -673,9 +673,11 @@ trait CheckAnalysis extends PredicateHelper with LookupCatalog with QueryErrorsB
}
case p @ Project(exprs, _) if containsMultipleGenerators(exprs) =>
- p.failAnalysis(
- errorClass = "_LEGACY_ERROR_TEMP_2433",
- messageParameters = Map("sqlExprs" -> exprs.map(_.sql).mkString(",")))
+ throw SparkException.internalError(
+ msg = "Only a single table generating function is allowed in a SELECT clause, " +
Review Comment:
Let me have a try.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] MaxGekk commented on a diff in pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on code in PR #41476:
URL: https://github.com/apache/spark/pull/41476#discussion_r1233250454
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala:
##########
@@ -787,8 +787,70 @@ class AnalysisErrorSuite extends AnalysisTest {
val error = intercept[AnalysisException] {
SimpleAnalyzer.checkAnalysis(join)
}
- assert(error.message.contains("Failure when resolving conflicting references in Join"))
- assert(error.message.contains("Conflicting attributes"))
+ checkError(
+ exception = error,
+ errorClass = "RESOLVED_PLAN_HAVE_CONFLICTING_ATTRS",
+ parameters = Map(
+ "nodeName" -> "Join",
+ "plan" -> "'Join Cross\n:- LocalRelation <empty>, [a#0]\n+- LocalRelation <empty>, [a#0]\n",
+ "conflictingAttributes" -> "\"a\""
+ )
+ )
+ }
+
+ test("error test for self-intersect") {
+ val intersect = Intersect(testRelation, testRelation, true)
+ val error = intercept[AnalysisException] {
+ SimpleAnalyzer.checkAnalysis(intersect)
Review Comment:
I see but if you cannot trigger the error from user space, we should convert the error to an internal one.
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala:
##########
@@ -787,8 +787,70 @@ class AnalysisErrorSuite extends AnalysisTest {
val error = intercept[AnalysisException] {
SimpleAnalyzer.checkAnalysis(join)
}
- assert(error.message.contains("Failure when resolving conflicting references in Join"))
- assert(error.message.contains("Conflicting attributes"))
+ checkError(
+ exception = error,
+ errorClass = "RESOLVED_PLAN_HAVE_CONFLICTING_ATTRS",
+ parameters = Map(
+ "nodeName" -> "Join",
+ "plan" -> "'Join Cross\n:- LocalRelation <empty>, [a#0]\n+- LocalRelation <empty>, [a#0]\n",
+ "conflictingAttributes" -> "\"a\""
+ )
+ )
+ }
+
+ test("error test for self-intersect") {
+ val intersect = Intersect(testRelation, testRelation, true)
+ val error = intercept[AnalysisException] {
+ SimpleAnalyzer.checkAnalysis(intersect)
Review Comment:
@beliefer Could you try to trigger it by from SQL.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] MaxGekk closed pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk closed pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
URL: https://github.com/apache/spark/pull/41476
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] MaxGekk commented on a diff in pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on code in PR #41476:
URL: https://github.com/apache/spark/pull/41476#discussion_r1233957875
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala:
##########
@@ -781,11 +781,43 @@ class AnalysisErrorSuite extends AnalysisTest {
test("error test for self-join") {
val join = Join(testRelation, testRelation, Cross, None, JoinHint.NONE)
- val error = intercept[AnalysisException] {
+ val error = intercept[SparkException] {
SimpleAnalyzer.checkAnalysis(join)
}
- assert(error.message.contains("Failure when resolving conflicting references in Join"))
- assert(error.message.contains("Conflicting attributes"))
+ assert(error.getMessage.contains("Failure when resolving conflicting references in Join"))
+ assert(error.getMessage.contains("Conflicting attributes"))
+ }
+
+ test("error test for self-intersect") {
+ val intersect = Intersect(testRelation, testRelation, true)
+ val error = intercept[SparkException] {
+ SimpleAnalyzer.checkAnalysis(intersect)
+ }
+ assert(error.getMessage.contains(
Review Comment:
Please, use `checkError`
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala:
##########
@@ -787,8 +787,70 @@ class AnalysisErrorSuite extends AnalysisTest {
val error = intercept[AnalysisException] {
SimpleAnalyzer.checkAnalysis(join)
}
- assert(error.message.contains("Failure when resolving conflicting references in Join"))
- assert(error.message.contains("Conflicting attributes"))
+ checkError(
+ exception = error,
+ errorClass = "RESOLVED_PLAN_HAVE_CONFLICTING_ATTRS",
+ parameters = Map(
+ "nodeName" -> "Join",
+ "plan" -> "'Join Cross\n:- LocalRelation <empty>, [a#0]\n+- LocalRelation <empty>, [a#0]\n",
+ "conflictingAttributes" -> "\"a\""
+ )
+ )
+ }
+
+ test("error test for self-intersect") {
+ val intersect = Intersect(testRelation, testRelation, true)
+ val error = intercept[AnalysisException] {
+ SimpleAnalyzer.checkAnalysis(intersect)
Review Comment:
cc @cloud-fan Just to-double check that errors are internal.
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala:
##########
@@ -781,11 +781,43 @@ class AnalysisErrorSuite extends AnalysisTest {
test("error test for self-join") {
val join = Join(testRelation, testRelation, Cross, None, JoinHint.NONE)
- val error = intercept[AnalysisException] {
+ val error = intercept[SparkException] {
SimpleAnalyzer.checkAnalysis(join)
}
- assert(error.message.contains("Failure when resolving conflicting references in Join"))
- assert(error.message.contains("Conflicting attributes"))
+ assert(error.getMessage.contains("Failure when resolving conflicting references in Join"))
Review Comment:
Internal errors have their own error class, could you use `checkError()`, 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] beliefer commented on a diff in pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #41476:
URL: https://github.com/apache/spark/pull/41476#discussion_r1233257528
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala:
##########
@@ -787,8 +787,70 @@ class AnalysisErrorSuite extends AnalysisTest {
val error = intercept[AnalysisException] {
SimpleAnalyzer.checkAnalysis(join)
}
- assert(error.message.contains("Failure when resolving conflicting references in Join"))
- assert(error.message.contains("Conflicting attributes"))
+ checkError(
+ exception = error,
+ errorClass = "RESOLVED_PLAN_HAVE_CONFLICTING_ATTRS",
+ parameters = Map(
+ "nodeName" -> "Join",
+ "plan" -> "'Join Cross\n:- LocalRelation <empty>, [a#0]\n+- LocalRelation <empty>, [a#0]\n",
+ "conflictingAttributes" -> "\"a\""
+ )
+ )
+ }
+
+ test("error test for self-intersect") {
+ val intersect = Intersect(testRelation, testRelation, true)
+ val error = intercept[AnalysisException] {
+ SimpleAnalyzer.checkAnalysis(intersect)
Review Comment:
> @beliefer Could you try to trigger it by from SQL.
We can't trigger it by SQL. Let me convert it to internal error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] beliefer commented on a diff in pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #41476:
URL: https://github.com/apache/spark/pull/41476#discussion_r1219596492
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1883,6 +1883,13 @@
],
"sqlState" : "42K05"
},
+ "RESOLVED_PLAN_HAVE_CONFLICTING_ATTRS" : {
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] beliefer commented on pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #41476:
URL: https://github.com/apache/spark/pull/41476#issuecomment-1610761578
@MaxGekk @cloud-fan Thank you for all.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] MaxGekk commented on pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #41476:
URL: https://github.com/apache/spark/pull/41476#issuecomment-1602695478
@beliefer Could you resolve conflicts, 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] beliefer commented on a diff in pull request #41476: [SPARK-43914][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2433-2437]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #41476:
URL: https://github.com/apache/spark/pull/41476#discussion_r1223008883
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala:
##########
@@ -787,8 +787,70 @@ class AnalysisErrorSuite extends AnalysisTest {
val error = intercept[AnalysisException] {
SimpleAnalyzer.checkAnalysis(join)
}
- assert(error.message.contains("Failure when resolving conflicting references in Join"))
- assert(error.message.contains("Conflicting attributes"))
+ checkError(
+ exception = error,
+ errorClass = "RESOLVED_PLAN_HAVE_CONFLICTING_ATTRS",
+ parameters = Map(
+ "nodeName" -> "Join",
+ "plan" -> "'Join Cross\n:- LocalRelation <empty>, [a#0]\n+- LocalRelation <empty>, [a#0]\n",
+ "conflictingAttributes" -> "\"a\""
+ )
+ )
+ }
+
+ test("error test for self-intersect") {
+ val intersect = Intersect(testRelation, testRelation, true)
+ val error = intercept[AnalysisException] {
+ SimpleAnalyzer.checkAnalysis(intersect)
Review Comment:
@MaxGekk Do you have any suggestion ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org