spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uncleGen <...@git.apache.org>
Subject [GitHub] spark pull request #17052: [SPARK-19690][SS] Join a streaming DataFrame with...
Date Tue, 28 Feb 2017 06:32:39 GMT
Github user uncleGen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17052#discussion_r103385054
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
---
    @@ -1119,11 +1119,16 @@ case class DecimalAggregates(conf: CatalystConf) extends Rule[LogicalPlan]
{
      */
     object ConvertToLocalRelation extends Rule[LogicalPlan] {
       def apply(plan: LogicalPlan): LogicalPlan = plan transform {
    -    case Project(projectList, LocalRelation(output, data))
    +    case Project(projectList, lr @ LocalRelation(output, data))
             if !projectList.exists(hasUnevaluableExpr) =>
           val projection = new InterpretedProjection(projectList, output)
           projection.initialize(0)
    -      LocalRelation(projectList.map(_.toAttribute), data.map(projection))
    +      if (lr.isStreaming) {
    +        LocalRelation(projectList.map(_.toAttribute), data.map(projection))
    +          .setIncremental()
    +      } else {
    +        LocalRelation(projectList.map(_.toAttribute), data.map(projection))
    +      }
       }
    --- End diff --
    
    In a streaming query, we will transfrom stream source to a batch `LocalRelation` whose
`isStreaming` is true, so we should keep new LocalRelation's `isStreaming` is true in this
rule.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message