cloud-fan commented on a change in pull request #23266: [SPARK-26313][SQL] move 
`newScanBuilder` from Table to read related mix-in traits
URL: https://github.com/apache/spark/pull/23266#discussion_r241236966
 
 

 ##########
 File path: 
sql/core/src/main/java/org/apache/spark/sql/sources/v2/SupportsBatchRead.java
 ##########
 @@ -24,10 +24,10 @@
 /**
  * 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.
+ * If a {@link Table} implements this interface, the
+ * {@link SupportsRead#newScanBuilder(DataSourceOptions)} must return a {@link 
ScanBuilder} that
+ * builds {@link Scan} with {@link Scan#toBatch()} implemented.
  * </p>
  */
 @Evolving
-public interface SupportsBatchRead extends Table { }
+public interface SupportsBatchRead extends SupportsRead { }
 
 Review comment:
   `SupportsRead` only makes sense under the table context. It also simplifies 
the code
   ```
   public interface SupportsBatchRead extends Table, SupportsRead { }
   public interface SupportsMicroBatchRead extends Table, SupportsRead { }
   public interface SupportsContinuousRead extends Table, SupportsRead { }
   ```
   to
   ```
   public interface SupportsBatchRead extends SupportsRead { }
   public interface SupportsMicroBatchRead extends SupportsRead { }
   public interface SupportsContinuousRead extends SupportsRead { }
   ```
   
   BTW `SupportsRead` is package private.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to