Github user marmbrus commented on a diff in the pull request: https://github.com/apache/spark/pull/12049#discussion_r58478446 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/ContinuousQueryManager.scala --- @@ -178,11 +178,19 @@ class ContinuousQueryManager(sqlContext: SQLContext) { throw new IllegalArgumentException( s"Cannot start query with name $name as a query with that name is already active") } + val logicalPlan = df.logicalPlan.transform { + case StreamingRelation(dataSource, output) => + // Materialize source to avoid creating it in every batch + val source = dataSource.createSource() + // We still need to use the previous `output` instead of `source.schema` as attributes in + // "_logicalPlan" has already used attributes of the previous `output`. --- End diff -- nit: i don't see anything named `_logicalPlan`
--- 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