HeartSaVioR commented on a change in pull request #33081:
URL: https://github.com/apache/spark/pull/33081#discussion_r670174985
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala
##########
@@ -335,12 +339,29 @@ abstract class SparkStrategies extends
QueryPlanner[SparkPlan] {
}
}
- AggUtils.planStreamingAggregation(
- normalizedGroupingExpressions,
- aggregateExpressions.map(expr =>
expr.asInstanceOf[AggregateExpression]),
- rewrittenResultExpressions,
- stateVersion,
- planLater(child))
+ sessionWindowOption match {
+ case Some(sessionWindow) =>
+ val stateVersion =
conf.getConf(SQLConf.STREAMING_SESSION_WINDOW_STATE_FORMAT_VERSION)
+
+ AggUtils.planStreamingAggregationForSession(
+ normalizedGroupingExpressions,
+ sessionWindow,
+ aggregateExpressions.map(expr =>
expr.asInstanceOf[AggregateExpression]),
+ rewrittenResultExpressions,
+ stateVersion,
+ conf.streamingSessionWindowMergeSessionInLocalPartition,
+ planLater(child))
+
+ case None =>
+ val stateVersion =
conf.getConf(SQLConf.STREAMING_AGGREGATION_STATE_FORMAT_VERSION)
Review comment:
I'll remove above one. Nice finding!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]