Github user gengliangwang commented on a diff in the pull request:
https://github.com/apache/spark/pull/21667#discussion_r200593158
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormat.scala
---
@@ -152,6 +152,11 @@ trait FileFormat {
}
}
+ /**
+ * Returns whether this format supports the given [[DataType]] in
read/write path.
+ * By default all data types are supported.
+ */
+ def supportDataType(dataType: DataType, isReadPath: Boolean): Boolean =
true
--- End diff --
Then we also need to update `LibSVMFileFormat`, and several file format in
unit test. I really prefer to have a default behavior here, as `FileFormat` can
still work without the new method.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]