maropu commented on a change in pull request #31052:
URL: https://github.com/apache/spark/pull/31052#discussion_r553674916



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/QueryCompilationErrors.scala
##########
@@ -662,4 +662,62 @@ object QueryCompilationErrors {
   def cannotReadCorruptedTablePropertyError(key: String, details: String = 
""): Throwable = {
     new AnalysisException(s"Cannot read table property '$key' as it's 
corrupted.$details")
   }
+
+  def invalidSchemaStringError(exp: Expression): Throwable = {
+    new AnalysisException(s"The expression '${exp.sql}' is not a valid schema 
string.")
+  }
+
+  def schemaMustBeFoldableError(exp: Expression): Throwable = {
+    new AnalysisException(
+      "Schema should be specified in DDL format as a string literal or output 
of " +
+        s"the schema_of_json/schema_of_csv functions instead of ${exp.sql}")
+  }
+
+  def schemaIsNotStructTypeError(dataType: DataType): Throwable = {
+    new AnalysisException(s"Schema should be struct type but got 
${dataType.sql}.")
+  }
+
+  def keyValueInMapNotExpectedError(m: CreateMap): Throwable = {

Review comment:
       `...StringTypeError`?




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