Github user rdblue commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23086#discussion_r236859358
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/sources/v2/DataSourceV2Suite.scala 
---
    @@ -396,87 +392,66 @@ object SimpleReaderFactory extends 
PartitionReaderFactory {
       }
     }
     
    -abstract class SimpleReadSupport extends BatchReadSupport {
    -  override def fullSchema(): StructType = new StructType().add("i", 
"int").add("j", "int")
    -
    -  override def newScanConfigBuilder(): ScanConfigBuilder = {
    -    NoopScanConfigBuilder(fullSchema())
    -  }
    +abstract class SimpleBatchTable extends Table with SupportsBatchRead  {
     
    -  override def createReaderFactory(config: ScanConfig): 
PartitionReaderFactory = {
    -    SimpleReaderFactory
    -  }
    +  override def schema(): StructType = new StructType().add("i", 
"int").add("j", "int")
     }
     
    +abstract class SimpleScanBuilder extends ScanBuilder
    +  with Batch with Scan {
    --- End diff --
    
    I like that the API is flexible enough that `ScanBuilder`, `Scan`, and 
`Batch` can be the same object in simple cases.


---

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

Reply via email to