Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions common/utils/src/main/resources/error/error-conditions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3471,6 +3471,12 @@
],
"sqlState" : "42803"
},
"MISSING_TIMEOUT_CONFIGURATION" : {
"message" : [
"The operation has timed out, but no timeout duration is configured. To set a processing time-based timeout, use 'GroupState.setTimeoutDuration()' in your 'mapGroupsWithState' or 'flatMapGroupsWithState' operation. For event-time-based timeout, use 'GroupState.setTimeoutTimestamp()' and define a watermark using 'Dataset.withWatermark()'."
],
"sqlState" : "HY000"
},
"MISSING_WINDOW_SPECIFICATION" : {
"message" : [
"Window specification is not defined in the WINDOW clause for <windowName>. For more information about WINDOW clauses, please refer to '<docroot>/sql-ref-syntax-qry-select-window.html'."
Expand Down Expand Up @@ -8377,11 +8383,6 @@
"continuous mode is not supported!"
]
},
"_LEGACY_ERROR_TEMP_3168" : {
"message" : [
"hasTimedOut is true however there's no timeout configured"
]
},
"_LEGACY_ERROR_TEMP_3169" : {
"message" : [
"AcceptsLatestSeenOffset is not supported with DSv1 streaming source: <unsupportedSources>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private[sql] object GroupStateImpl {
throw new IllegalArgumentException("eventTimeWatermarkMs must be 0 or positive if present")
}
if (hasTimedOut && timeoutConf == NoTimeout) {
throw new SparkUnsupportedOperationException("_LEGACY_ERROR_TEMP_3168")
throw new SparkUnsupportedOperationException("MISSING_TIMEOUT_CONFIGURATION")
}

new GroupStateImpl[S](
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,13 +302,13 @@ class GroupStateSuite extends SparkFunSuite {
TestGroupState.create[Int](
Optional.of(5), NoTimeout, 100L, Optional.empty[Long], hasTimedOut = true)
},
condition = "_LEGACY_ERROR_TEMP_3168",
condition = "MISSING_TIMEOUT_CONFIGURATION",
parameters = Map.empty)
checkError(
exception = intercept[SparkUnsupportedOperationException] {
GroupStateImpl.createForStreaming[Int](Some(5), 100L, NO_TIMESTAMP, NoTimeout, true, false)
},
condition = "_LEGACY_ERROR_TEMP_3168",
condition = "MISSING_TIMEOUT_CONFIGURATION",
parameters = Map.empty)
}

Expand Down