cloud-fan commented on a change in pull request #25651: [SPARK-28948][SQL]
support data source v2 in CREATE TABLE USING
URL: https://github.com/apache/spark/pull/25651#discussion_r319931123
##########
File path:
sql/catalyst/src/main/java/org/apache/spark/sql/sources/v2/TableProvider.java
##########
@@ -44,18 +45,28 @@
Table getTable(CaseInsensitiveStringMap options);
/**
- * Return a {@link Table} instance to do read/write with user-specified
schema and options.
+ * Return a {@link Table} instance to do read/write with user-specified
options and additional
+ * schema/partitions information. The additional schema/partitions
information can be specified
+ * by users (e.g. {@code session.read.format("myFormat").schema(...)}) or
retrieved from the
+ * metastore (e.g. {@code CREATE TABLE t(i INT) USING myFormat}).
+ * <p>
+ * The returned table must report the same schema/partitions with the ones
that are passed in.
* <p>
* By default this method throws {@link UnsupportedOperationException},
implementations should
- * override this method to handle user-specified schema.
+ * override this method to handle the additional schema/partitions
information.
* </p>
* @param options the user-specified options that can identify a table, e.g.
file path, Kafka
* topic name, etc. It's an immutable case-insensitive
string-to-string map.
- * @param schema the user-specified schema.
+ * @param schema the additional schema information.
+ * @param partitions the additional partitions information.
* @throws UnsupportedOperationException
*/
- default Table getTable(CaseInsensitiveStringMap options, StructType schema) {
+ default Table getTable(
Review comment:
I'll refine the classdoc of this interface, after we reach an agreement of
the proposal.
----------------------------------------------------------------
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]