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

    https://github.com/apache/spark/pull/12247#discussion_r59255827
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala
 ---
    @@ -123,8 +123,16 @@ case class DataSource(
         }
       }
     
    -  /** Returns a source that can be used to continually read data. */
    -  def createSource(): Source = {
    +  /**
    +   * Returns a source that can be used to continually read data.
    +   *
    +   * Before running a real query (e.g., df.explain), `sourceId` and 
`checkpointLocation` is None
    +   * as they are unknown. [[ContinuousQueryManager]] should set `sourceId` 
and `checkpointLocation`
    +   * before starting a query.
    +   */
    +  def createSource(
    +      sourceId: Option[Long] = None,
    +      checkpointLocation: Option[String] = None): Source = {
    --- End diff --
    
    Yeah, and we also don't really need to create a source there (we only need 
to know the schema).  Perhaps getting the schema should be separated from 
getting the source (like we do in FileFormat).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to