jerrypeng commented on code in PR #47940:
URL: https://github.com/apache/spark/pull/47940#discussion_r1742818474
##########
sql/core/src/test/scala/org/apache/spark/sql/streaming/FlatMapGroupsWithStateSuite.scala:
##########
@@ -635,6 +634,25 @@ class FlatMapGroupsWithStateSuite extends
StateStoreMetricsTest {
)
}
+ testWithAllStateVersions("[SPARK-49474] flatMapGroupsWithState - user error
is classified") {
+ // Function to maintain running count up to 2, and then remove the count
+ // Returns the data and the count if state is defined, otherwise does not
return anything
+ val stateFunc = (_: String, _: Iterator[String], _:
GroupState[RunningCount]) => {
+
Iterator(null.asInstanceOf[GroupState[RunningCount]].getCurrentProcessingTimeMs())
Review Comment:
An NPE will be thrown here? If you are just trying to simulate an error in
the user defined function, can we just explicitly throw an exception so the
code is clear?
--
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]