allisonwang-db commented on a change in pull request #31316:
URL: https://github.com/apache/spark/pull/31316#discussion_r575457447



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala
##########
@@ -732,4 +732,20 @@ private[spark] object QueryCompilationErrors {
     new InvalidUDFClassException(s"No handler for UDAF '$name'. " +
       "Use sparkSession.udf.register(...) instead.")
   }
+
+   def unexpectedColumnExpressionError(column: Expression): Throwable = {
+    new AnalysisException(s"[BUG] unexpected column expression: $column")
+  }
+
+  def databaseFromV1SessionCatalogNotSpecifiedError(): Throwable = {
+    new AnalysisException("Database from v1 session catalog is not specified")
+  }
+
+  def nestedDatabaseUnsupportedByV1SessionCatalogError(catalog: String): 
Throwable = {
+    new AnalysisException(s"Nested databases are not supported by v1 session 
catalog: $catalog")
+  }
+
+  def invalidCallFunctionOnUnresolvedObjectError(function: String): String = {

Review comment:
       I think this is a bit strange to have a string in here representing the 
error message, instead of the error itself. We can either change all `throw new 
UnresolvedException` to be `throw QueryCompilationError.unresolvedError` or we 
can leave the UnresolvedException as it is for now.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to