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

    https://github.com/apache/spark/pull/12119#discussion_r58635507
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala ---
    @@ -275,23 +279,64 @@ final class DataFrameWriter private[sql](df: 
DataFrame) {
        * @since 2.0.0
        */
       def startStream(): ContinuousQuery = {
    -    val dataSource =
    -      DataSource(
    -        df.sqlContext,
    -        className = source,
    -        options = extraOptions.toMap,
    -        partitionColumns = normalizedParCols.getOrElse(Nil))
    -
    -    val queryName = extraOptions.getOrElse("queryName", 
StreamExecution.nextName)
    -    val checkpointLocation = extraOptions.getOrElse("checkpointLocation", {
    -      new Path(df.sqlContext.conf.checkpointLocation, 
queryName).toUri.toString
    -    })
    -    df.sqlContext.sessionState.continuousQueryManager.startQuery(
    -      queryName,
    -      checkpointLocation,
    -      df,
    -      dataSource.createSink(),
    -      trigger)
    +    if (source == "memory") {
    +      val queryName =
    +        extraOptions.getOrElse(
    +          "queryName", throw new AnalysisException("queryName must be 
specified for memory sink"))
    +      val checkpointLocation = extraOptions.get("checkpointLocation").map 
{ userSpecified =>
    +        new Path(userSpecified).toUri.toString
    +      }.orElse {
    +        val checkpointConfig: Option[String] =
    --- End diff --
    
    Ah, right.  That was left over from my first attempt.  SGTM.


---
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