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

    https://github.com/apache/spark/pull/21582#discussion_r195950366
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala
 ---
    @@ -59,6 +59,19 @@ private[sql] object OrcFileFormat {
       def checkFieldNames(names: Seq[String]): Unit = {
         names.foreach(checkFieldName)
       }
    +
    +  def getQuotedSchemaString(dataType: DataType): String = dataType match {
    +    case _: AtomicType => dataType.catalogString
    +    case StructType(fields) =>
    +      fields.map(f => s"`${f.name}`:${getQuotedSchemaString(f.dataType)}")
    +        .mkString("struct<", ",", ">")
    +    case ArrayType(elementType, _) =>
    +      s"array<${getQuotedSchemaString(elementType)}>"
    +    case MapType(keyType, valueType, _) =>
    +      
s"map<${getQuotedSchemaString(keyType)},${getQuotedSchemaString(valueType)}>"
    +    case _ => // UDT and others
    +      dataType.catalogString
    --- End diff --
    
    We don't need to recursively quote `udt.sqlType`?



---

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

Reply via email to