WweiL commented on code in PR #38503:
URL: https://github.com/apache/spark/pull/38503#discussion_r1017447511


##########
sql/core/src/test/scala/org/apache/spark/sql/streaming/FlatMapGroupsInPandasWithStateSuite.scala:
##########
@@ -240,25 +240,30 @@ class FlatMapGroupsInPandasWithStateSuite extends 
StateStoreMetricsTest {
         .groupBy("key")
         .count()
 
-    testStream(result, Complete)(
-      AddData(inputData, "a"),
-      CheckNewAnswer(("a", 1)),
-      AddData(inputData, "a", "b"),
-      // mapGroups generates ("a", "2"), ("b", "1"); so increases counts of a 
and b by 1
-      CheckNewAnswer(("a", 2), ("b", 1)),
-      StopStream,
-      StartStream(),
-      AddData(inputData, "a", "b"),
-      // mapGroups should remove state for "a" and generate ("a", "-1"), ("b", 
"2") ;
-      // so increment a and b by 1
-      CheckNewAnswer(("a", 3), ("b", 2)),
-      StopStream,
-      StartStream(),
-      AddData(inputData, "a", "c"),
-      // mapGroups should recreate state for "a" and generate ("a", "1"), 
("c", "1") ;
-      // so increment a and c by 1
-      CheckNewAnswer(("a", 4), ("b", 2), ("c", 1))
-    )
+    // As of [SPARK-40940], multiple state operator with Complete mode is 
disabled by default
+    val exp = intercept[AnalysisException] {

Review Comment:
   This is the test I was mentioning @alex-balikov 
   
   Just to confirm, in the above suite, 
sql/core/src/test/scala/org/apache/spark/sql/streaming/FlatMapGroupsInPandasWithStateSuite.scala,
 there is a query which is flatMapGroupsWithState followed by an agg in 
complete mode, it also seems to be supported before. But here after the change 
it throws because there are two stateful ops in complete mode. Should we also 
allow this case? I'm not sure here because I remember you mentioned 
flatMapGroupsWithState could change the eventtime so we should disallow... So 
is the test wrong..?



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