anishshri-db commented on code in PR #53881:
URL: https://github.com/apache/spark/pull/53881#discussion_r2722396608
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -2945,6 +2945,16 @@ object SQLConf {
.booleanConf
.createWithDefault(false)
+ val STREAMING_CHECK_UNFINISHED_REPARTITION_ON_RESTART =
+ buildConf("spark.sql.streaming.checkUnfinishedRepartitionOnRestart")
Review Comment:
why not use `spark.sql.streaming.stateStore` ?
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -2945,6 +2945,16 @@ object SQLConf {
.booleanConf
.createWithDefault(false)
+ val STREAMING_CHECK_UNFINISHED_REPARTITION_ON_RESTART =
+ buildConf("spark.sql.streaming.checkUnfinishedRepartitionOnRestart")
Review Comment:
Why do we want to expose a flag for this ?
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -6065,6 +6065,13 @@
],
"sqlState" : "42K03"
},
+ "STREAMING_UNFINISHED_REPARTITION_DETECTED" : {
+ "message" : [
+ "The latest batch <batchId> is for an unfinished state repartitioning
i.e. last committed batch is: <lastCommittedBatchId>).",
+ "Let the repartitioning finish successfully before starting the
streaming query."
Review Comment:
nit: `Please retry the repartitioning operation before`
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/runtime/AsyncProgressTrackingMicroBatchExecution.scala:
##########
@@ -129,6 +129,14 @@ class AsyncProgressTrackingMicroBatchExecution(
// after the offset WAL commit has be successfully written
}
+ override def checkUnfinishedRepartitionBatch(
+ latestStartedBatchId: Option[Long],
+ lastCommittedBatchId: Long,
+ offsetLog: OffsetSeqLog): Unit = {
+ // No-op for async progress tracking since it doesn't support stateful
streaming queries.
Review Comment:
should we throw an unsupported operation exception instead ?
--
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]