From 1a02d46201f142cf748fd3aa09d5d119b9c7dbab Mon Sep 17 00:00:00 2001 From: Jacek Laskowski Date: Sun, 23 Nov 2025 20:54:34 +0100 Subject: [PATCH] Add missing error classes --- .../src/main/resources/error/error-conditions.json | 12 ++++++++++++ .../spark/sql/pipelines/graph/GraphValidations.scala | 9 ++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/common/utils/src/main/resources/error/error-conditions.json b/common/utils/src/main/resources/error/error-conditions.json index 2017f1fc331e..6f79c7c431fb 100644 --- a/common/utils/src/main/resources/error/error-conditions.json +++ b/common/utils/src/main/resources/error/error-conditions.json @@ -2832,6 +2832,12 @@ }, "sqlState" : "42602" }, + "INVALID_DESTINATION_WITH_MULTIPLE_FLOWS" : { + "message" : [ + "Invalid destination with multiple flows: ." + ], + "sqlState" : "42000" + }, "INVALID_DRIVER_MEMORY" : { "message" : [ "System memory must be at least .", @@ -5028,6 +5034,12 @@ }, "sqlState" : "42710" }, + "PIPELINE_GRAPH_NOT_TOPOLOGICALLY_SORTED" : { + "message" : [ + "Pipeline graph must be topologically sorted (flow with unvisited input )" + ], + "sqlState" : "42000" + }, "PIPELINE_SQL_GRAPH_ELEMENT_REGISTRATION_ERROR" : { "message" : [ "", diff --git a/sql/pipelines/src/main/scala/org/apache/spark/sql/pipelines/graph/GraphValidations.scala b/sql/pipelines/src/main/scala/org/apache/spark/sql/pipelines/graph/GraphValidations.scala index 824c15dc8791..ac3841e2163f 100644 --- a/sql/pipelines/src/main/scala/org/apache/spark/sql/pipelines/graph/GraphValidations.scala +++ b/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", + "INVALID_DESTINATION_WITH_MULTIPLE_FLOWS", Map( "tableName" -> dest.unquotedString, - "queries" -> flows.map(_.identifier).mkString(",") + "flows" -> flows + .map(_.displayName) + .sorted + .mkString(", ") ) ) } @@ -150,7 +153,7 @@ trait GraphValidations extends Logging { throw new AnalysisException( "PIPELINE_GRAPH_NOT_TOPOLOGICALLY_SORTED", Map( - "flowName" -> f.identifier.unquotedString, + "flowName" -> f.displayName, "inputName" -> unvisitedInput.unquotedString ) )