Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions common/utils/src/main/resources/error/error-conditions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2873,6 +2873,12 @@
},
"sqlState" : "42602"
},
"MATERIALIZED_VIEW_WITH_MULTIPLE_QUERIES" : {
"message" : [
"Invalid destination <tableName> with multiple flows: <flows>."
],
"sqlState" : "42000"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we provide a more specific SQL state?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 🙏

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about 42710?

},
"INVALID_DRIVER_MEMORY" : {
"message" : [
"System memory <systemMemory> must be at least <minSystemMemory>.",
Expand Down Expand Up @@ -5069,6 +5075,12 @@
},
"sqlState" : "42710"
},
"PIPELINE_GRAPH_NOT_TOPOLOGICALLY_SORTED" : {
"message" : [
"There is a cycle between <flowName> and <inputName>."
],
"sqlState" : "0A000"
},
"PIPELINE_SQL_GRAPH_ELEMENT_REGISTRATION_ERROR" : {
"message" : [
"<message>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ trait GraphValidations extends Logging {
"MATERIALIZED_VIEW_WITH_MULTIPLE_QUERIES",
Map(
"tableName" -> dest.unquotedString,
"queries" -> flows.map(_.identifier).mkString(",")
"flows" -> flows
.map(_.displayName)
.sorted
.mkString(", ")
)
)
}
Expand Down Expand Up @@ -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
)
)
Expand Down