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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]