cloud-fan commented on a change in pull request #24012: [SPARK-26811][SQL] Add
capabilities to v2.Table
URL: https://github.com/apache/spark/pull/24012#discussion_r266015572
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FileTable.scala
##########
@@ -58,10 +59,16 @@ abstract class FileTable(
fileIndex.partitionSchema, caseSensitive)._1
}
+ override def capabilities(): java.util.Set[TableCapability] =
FileTable.CAPABILITIES
+
/**
* When possible, this method should return the schema of the given `files`.
When the format
* does not support inference, or no valid files are given should return
None. In these cases
* Spark will require that user specify the schema manually.
*/
def inferSchema(files: Seq[FileStatus]): Option[StructType]
}
+
+object FileTable {
+ private lazy val CAPABILITIES = Set(BATCH_READ, BATCH_WRITE, TRUNCATE).asJava
Review comment:
nit: this doesn't need to be `lazy val`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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]