Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17320#discussion_r106550372
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala
 ---
    @@ -634,7 +661,12 @@ case class StructToJson(
       override def inputTypes: Seq[AbstractDataType] = StructType :: Nil
     }
     
    -object StructToJson {
    +object JsonExprUtils {
    +
    +  def validateSchemaLiteral(exp: Expression): StructType = exp match {
    +    case Literal(s, StringType) => 
CatalystSqlParser.parseTableSchema(s.toString)
    +    case e => throw new AnalysisException(s"Must be a string literal, but: 
$e")
    --- End diff --
    
    How about? 
    > Expected a string literal instead of $e


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to