Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/21667#discussion_r201747863
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala
---
@@ -228,4 +224,21 @@ class OrcFileFormat
}
}
}
+
+ override def supportDataType(dataType: DataType, isReadPath: Boolean):
Boolean = dataType match {
+ case _: AtomicType => true
+
+ case st: StructType => st.forall { f => supportDataType(f.dataType,
isReadPath) }
+
+ case ArrayType(elementType, _) => supportDataType(elementType,
isReadPath)
+
+ case MapType(keyType, valueType, _) =>
+ supportDataType(keyType, isReadPath) && supportDataType(valueType,
isReadPath)
+
+ case udt: UserDefinedType[_] => supportDataType(udt.sqlType,
isReadPath)
+
+ case _: NullType => isReadPath
+
+ case _ => false
--- End diff --
ditto
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]