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

    https://github.com/apache/spark/pull/23086#discussion_r236852153
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Relation.scala
 ---
    @@ -170,15 +157,24 @@ object DataSourceV2Relation {
       }
     
       def create(
    -      source: DataSourceV2,
    +      provider: TableProvider,
    +      table: SupportsBatchRead,
           options: Map[String, String],
           tableIdent: Option[TableIdentifier] = None,
           userSpecifiedSchema: Option[StructType] = None): 
DataSourceV2Relation = {
    -    val readSupport = source.createReadSupport(options, 
userSpecifiedSchema)
    -    val output = readSupport.fullSchema().toAttributes
    +    val output = table.schema().toAttributes
         val ident = tableIdent.orElse(tableFromOptions(options))
         DataSourceV2Relation(
    -      source, readSupport, output, options, ident, userSpecifiedSchema)
    +      provider, table, output, options, ident, userSpecifiedSchema)
    +  }
    +
    +  def createRelationForWrite(
    --- End diff --
    
    Also note that this is temporary until the write side is finished?


---

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

Reply via email to