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

    https://github.com/apache/spark/pull/19747#discussion_r151213429
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala 
---
    @@ -895,6 +897,18 @@ private[hive] object HiveClientImpl {
         Option(hc.getComment).map(field.withComment).getOrElse(field)
       }
     
    +  private def verifyColumnDataType(schema: StructType): Unit = {
    +    schema.foreach(field => {
    +      val typeString = field.dataType.catalogString
    +      try {
    +        CatalystSqlParser.parseDataType(typeString)
    +      } catch {
    +        case e: ParseException =>
    +          throw new SparkException(s"Cannot recognize the data type: 
$typeString", e)
    --- End diff --
    
    -> `AnalysisException`


---

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

Reply via email to