spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (SPARK-26313) move read related methods from Table to read related mix-in traits
Date Tue, 11 Dec 2018 17:04:00 GMT


ASF GitHub Bot commented on SPARK-26313:

dongjoon-hyun commented on a change in pull request #23266: [SPARK-26313][SQL] move read related
methods from Table to read related mix-in traits

 File path: sql/core/src/main/java/org/apache/spark/sql/sources/v2/
 @@ -20,14 +20,27 @@
 import org.apache.spark.annotation.Evolving;
 import org.apache.spark.sql.sources.v2.reader.Scan;
 import org.apache.spark.sql.sources.v2.reader.ScanBuilder;
+import org.apache.spark.sql.types.StructType;
- * An empty mix-in interface for {@link Table}, to indicate this table supports batch scan.
- * <p>
- * If a {@link Table} implements this interface, its {@link Table#newScanBuilder(DataSourceOptions)}
- * must return a {@link ScanBuilder} that builds {@link Scan} with {@link Scan#toBatch()}
- * implemented.
- * </p>
+ * A mix-in interface for {@link Table} to provide data reading ability of batch processing.
-public interface SupportsBatchRead extends Table { }
+public interface SupportsBatchRead extends Table {
+  /**
+   * Returns the schema of this table.
+   */
+  StructType schema();
 Review comment:
   I'd moving the schema stuff to a new single interface. That would be better for Single
Responsibility Principle. @rdblue , in that case, we are good, right? Is there any other concerns?
   > I don't see the value in moving the schema to a different interface, and I think that
moving the schema to an interface specific to the read path is worse because it causes the
problem that a table must be readable to be writable.

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:

> move read related methods from Table to read related mix-in traits
> ------------------------------------------------------------------
>                 Key: SPARK-26313
>                 URL:
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Wenchen Fan
>            Assignee: Wenchen Fan
>            Priority: Major

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message