srowen commented on a change in pull request #23639: [SPARK-26716][SQL]
FileFormat: the supported types of read/write should be consistent
URL: https://github.com/apache/spark/pull/23639#discussion_r251238024
##########
File path:
sql/hive/src/main/scala/org/apache/spark/sql/hive/orc/OrcFileFormat.scala
##########
@@ -181,19 +181,17 @@ class OrcFileFormat extends FileFormat with
DataSourceRegister with Serializable
}
}
- override def supportDataType(dataType: DataType, isReadPath: Boolean):
Boolean = dataType match {
+ override def supportDataType(dataType: DataType): Boolean = dataType match {
case _: AtomicType => true
- case st: StructType => st.forall { f => supportDataType(f.dataType,
isReadPath) }
+ case st: StructType => st.forall { f => supportDataType(f.dataType) }
- case ArrayType(elementType, _) => supportDataType(elementType, isReadPath)
+ case ArrayType(elementType, _) => supportDataType(elementType)
case MapType(keyType, valueType, _) =>
- supportDataType(keyType, isReadPath) && supportDataType(valueType,
isReadPath)
+ supportDataType(keyType) && supportDataType(valueType)
- case udt: UserDefinedType[_] => supportDataType(udt.sqlType, isReadPath)
-
- case _: NullType => isReadPath
Review comment:
This change and the similar one above seem to change the logic. Now NullType
always results in false. I'm not clear that's OK?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]