anishshri-db commented on code in PR #49632:
URL: https://github.com/apache/spark/pull/49632#discussion_r1938149745


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FlatMapGroupsWithStateExec.scala:
##########
@@ -312,10 +315,10 @@ trait FlatMapGroupsWithStateExecBase
       val groupedInitialStateIter =
         GroupedIterator(initStateIter, initialStateGroupAttrs, 
initialState.output)
 
-      // Create a CoGroupedIterator that will group the two iterators together 
for every key group.
-      new CoGroupedIterator(
-          groupedChildDataIter, groupedInitialStateIter, 
groupingAttributes).flatMap {
-        case (keyRow, valueRowIter, initialStateRowIter) =>
+      if (skipEmittingInitialStateKeys) {

Review Comment:
   Done



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FlatMapGroupsWithStateExec.scala:
##########
@@ -533,9 +564,16 @@ object FlatMapGroupsWithStateExec {
       outputObjAttr: Attribute,
       timeoutConf: GroupStateTimeout,
       hasInitialState: Boolean,
+      skipEmittingInitialStateKeys: Boolean,
       initialState: SparkPlan,
       child: SparkPlan): SparkPlan = {
     if (hasInitialState) {
+      // we wont support skipping emitting initial state keys for batch queries

Review Comment:
   Done



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to