You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "jaceklaskowski (via GitHub)" <gi...@apache.org> on 2025/11/23 20:06:22 UTC
[PR] [SPARK-54468][SDP] Add missing error classes [spark]
jaceklaskowski opened a new pull request, #53186:
URL: https://github.com/apache/spark/pull/53186
### What changes were proposed in this pull request?
Added two missing error classes
### Why are the changes needed?
`MATERIALIZED_VIEW_WITH_MULTIPLE_QUERIES` and `PIPELINE_GRAPH_NOT_TOPOLOGICALLY_SORTED` error classes were not defined yet used in SDP.
### Does this PR introduce _any_ user-facing change?
Sort of. It fixes what should be reported properly with the error classes.
### How was this patch tested?
Built locally. Awaiting the official build to pass
### Was this patch authored or co-authored using generative AI tooling?
No
--
This is an automated message from the 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
Re: [PR] [SPARK-54468][SDP] Add missing error classes [spark]
Posted by "jaceklaskowski (via GitHub)" <gi...@apache.org>.
jaceklaskowski commented on PR #53186:
URL: https://github.com/apache/spark/pull/53186#issuecomment-3695064184
@sryza it's possible that @allisonwang-db just CC'ed @srielau as a FYI not to seek their approval. Are you OK to approve the changes?
--
This is an automated message from the 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
Re: [PR] [SPARK-54468][SDP] Add missing error classes [spark]
Posted by "allisonwang-db (via GitHub)" <gi...@apache.org>.
allisonwang-db commented on code in PR #53186:
URL: https://github.com/apache/spark/pull/53186#discussion_r2563116329
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -2832,6 +2832,12 @@
},
"sqlState" : "42602"
},
+ "INVALID_DESTINATION_WITH_MULTIPLE_FLOWS" : {
+ "message" : [
+ "Invalid destination <tableName> with multiple flows: <flows>."
+ ],
+ "sqlState" : "42000"
Review Comment:
Can we provide a more specific SQL state?
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -5028,6 +5034,12 @@
},
"sqlState" : "42710"
},
+ "PIPELINE_GRAPH_NOT_TOPOLOGICALLY_SORTED" : {
+ "message" : [
+ "Pipeline graph must be topologically sorted (flow <flowName> with unvisited input <inputName>)"
+ ],
+ "sqlState" : "42000"
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.
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
Re: [PR] [SPARK-54468][SDP] Add missing error classes [spark]
Posted by "sryza (via GitHub)" <gi...@apache.org>.
sryza commented on code in PR #53186:
URL: https://github.com/apache/spark/pull/53186#discussion_r2581802722
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -5033,6 +5039,12 @@
},
"sqlState" : "42710"
},
+ "PIPELINE_GRAPH_NOT_TOPOLOGICALLY_SORTED" : {
+ "message" : [
+ "Pipeline graph must be topologically sorted (flow <flowName> with unvisited input <inputName>)"
Review Comment:
I think we can say `There is a cycle between <flowName> and <inputName>.`
##########
sql/pipelines/src/main/scala/org/apache/spark/sql/pipelines/graph/GraphValidations.scala:
##########
@@ -44,10 +44,13 @@ trait GraphValidations extends Logging {
.foreach {
case (dest, flows) =>
throw new AnalysisException(
- "MATERIALIZED_VIEW_WITH_MULTIPLE_QUERIES",
Review Comment:
I do think `MATERIALIZED_VIEW_WITH_MULTIPLE_QUERIES` would be a clearer error here, as the "materialized view"-ness is the real reason multiple queries aren't allowed (even though the code doesn't reflect this super well).
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -2832,6 +2832,12 @@
},
"sqlState" : "42602"
},
+ "INVALID_DESTINATION_WITH_MULTIPLE_FLOWS" : {
+ "message" : [
+ "Invalid destination <tableName> with multiple flows: <flows>."
+ ],
+ "sqlState" : "42000"
Review Comment:
I did some investigation into this and couldn't figure out a better SQL state than `42000`. @allisonwang-db do you have on in mind? If not, mind if we stick with this?
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -5028,6 +5034,12 @@
},
"sqlState" : "42710"
},
+ "PIPELINE_GRAPH_NOT_TOPOLOGICALLY_SORTED" : {
+ "message" : [
+ "Pipeline graph must be topologically sorted (flow <flowName> with unvisited input <inputName>)"
+ ],
+ "sqlState" : "42000"
Review Comment:
For this one I think we can use `0A000` – "feature not supported", because we don't support materialized views with multiple queries.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
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
Re: [PR] [SPARK-54468][SDP] Add missing error classes [spark]
Posted by "allisonwang-db (via GitHub)" <gi...@apache.org>.
allisonwang-db commented on code in PR #53186:
URL: https://github.com/apache/spark/pull/53186#discussion_r2593583664
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -2832,6 +2832,12 @@
},
"sqlState" : "42602"
},
+ "INVALID_DESTINATION_WITH_MULTIPLE_FLOWS" : {
+ "message" : [
+ "Invalid destination <tableName> with multiple flows: <flows>."
+ ],
+ "sqlState" : "42000"
Review Comment:
How about 42710?
--
This is an automated message from the 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
Re: [PR] [SPARK-54468][SDP] Add missing error classes [spark]
Posted by "sryza (via GitHub)" <gi...@apache.org>.
sryza closed pull request #53186: [SPARK-54468][SDP] Add missing error classes
URL: https://github.com/apache/spark/pull/53186
--
This is an automated message from the 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
Re: [PR] [SPARK-54468][SDP] Add missing error classes [spark]
Posted by "jaceklaskowski (via GitHub)" <gi...@apache.org>.
jaceklaskowski commented on PR #53186:
URL: https://github.com/apache/spark/pull/53186#issuecomment-3709513922
@sryza You were right. Re-ordering the error class made all the checks pass! Please 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
Re: [PR] [SPARK-54468][SDP] Add missing error classes [spark]
Posted by "jaceklaskowski (via GitHub)" <gi...@apache.org>.
jaceklaskowski commented on PR #53186:
URL: https://github.com/apache/spark/pull/53186#issuecomment-3568291347
@sryza Have a look and LMK if new tests should be added. Happy to learn how to add them if needed. Please guide 🙏
--
This is an automated message from the 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
Re: [PR] [SPARK-54468][SDP] Add missing error classes [spark]
Posted by "jaceklaskowski (via GitHub)" <gi...@apache.org>.
jaceklaskowski commented on code in PR #53186:
URL: https://github.com/apache/spark/pull/53186#discussion_r2572201243
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -2832,6 +2832,12 @@
},
"sqlState" : "42602"
},
+ "INVALID_DESTINATION_WITH_MULTIPLE_FLOWS" : {
+ "message" : [
+ "Invalid destination <tableName> with multiple flows: <flows>."
+ ],
+ "sqlState" : "42000"
Review Comment:
I've got no idea what would make SQL states more specific, and picked `42000` at random. Can you guide me how to make it more specific, @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.
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
Re: [PR] [SPARK-54468][SDP] Add missing error classes [spark]
Posted by "jaceklaskowski (via GitHub)" <gi...@apache.org>.
jaceklaskowski commented on PR #53186:
URL: https://github.com/apache/spark/pull/53186#issuecomment-3633220710
@sryza @allisonwang-db Can I ask for your help resolving the issue with `sqlCode`?
--
This is an automated message from the 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
Re: [PR] [SPARK-54468][SDP] Add missing error classes [spark]
Posted by "jaceklaskowski (via GitHub)" <gi...@apache.org>.
jaceklaskowski commented on PR #53186:
URL: https://github.com/apache/spark/pull/53186#issuecomment-3708078783
@sryza Happy New Year 2026! Mind if I ask you to approve the MR 🙏
--
This is an automated message from the 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
Re: [PR] [SPARK-54468][SDP] Add missing error classes [spark]
Posted by "jaceklaskowski (via GitHub)" <gi...@apache.org>.
jaceklaskowski commented on PR #53186:
URL: https://github.com/apache/spark/pull/53186#issuecomment-3597874630
@sryza @dongjoon-hyun Do you have any idea which `sqlState` would be better suited for these missing error classes?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-54468][SDP] Add missing error classes [spark]
Posted by "jaceklaskowski (via GitHub)" <gi...@apache.org>.
jaceklaskowski commented on PR #53186:
URL: https://github.com/apache/spark/pull/53186#issuecomment-3695063177
@srielau, May I ask you for your approval? 🙏
--
This is an automated message from the 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