You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by hv...@apache.org on 2023/08/02 19:18:27 UTC
[spark] branch branch-3.5 updated: [SPARK-44421][FOLLOWUP] Minor rename of ResponseComplete to ResultComplete
This is an automated email from the ASF dual-hosted git repository.
hvanhovell pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.5 by this push:
new fde43c94ee4 [SPARK-44421][FOLLOWUP] Minor rename of ResponseComplete to ResultComplete
fde43c94ee4 is described below
commit fde43c94ee4e3bf9e95166de7387c0ec925984e6
Author: Juliusz Sompolski <ju...@databricks.com>
AuthorDate: Wed Aug 2 15:18:08 2023 -0400
[SPARK-44421][FOLLOWUP] Minor rename of ResponseComplete to ResultComplete
### What changes were proposed in this pull request?
In an earlier draft, the message was ResponseComplete. Missed renaming it in a few places.
### Why are the changes needed?
Minor followup cleanup.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
No code semantics changes, just rename.
Closes #42300 from juliuszsompolski/SPARK-44421-followup.
Authored-by: Juliusz Sompolski <ju...@databricks.com>
Signed-off-by: Herman van Hovell <he...@databricks.com>
(cherry picked from commit 6882482fcdfb438c3b5a0b1b2ece58658ac1f0e7)
Signed-off-by: Herman van Hovell <he...@databricks.com>
---
.../client/ExecutePlanResponseReattachableIterator.scala | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/ExecutePlanResponseReattachableIterator.scala b/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/ExecutePlanResponseReattachableIterator.scala
index 00787b8f94d..008b3c3dd5c 100644
--- a/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/ExecutePlanResponseReattachableIterator.scala
+++ b/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/ExecutePlanResponseReattachableIterator.scala
@@ -85,10 +85,10 @@ class ExecutePlanResponseReattachableIterator(
// ResponseId of the last response returned by next()
private var lastReturnedResponseId: Option[String] = None
- // True after ResponseComplete message was seen in the stream.
+ // True after ResultComplete message was seen in the stream.
// Server will always send this message at the end of the stream, if the underlying iterator
// finishes without producing one, another iterator needs to be reattached.
- private var responseComplete: Boolean = false
+ private var resultComplete: Boolean = false
// Initial iterator comes from ExecutePlan request.
// Note: This is not retried, because no error would ever be thrown here, and GRPC will only
@@ -97,7 +97,7 @@ class ExecutePlanResponseReattachableIterator(
rawBlockingStub.executePlan(initialRequest)
override def next(): proto.ExecutePlanResponse = synchronized {
- // hasNext will trigger reattach in case the stream completed without responseComplete
+ // hasNext will trigger reattach in case the stream completed without resultComplete
if (!hasNext()) {
throw new java.util.NoSuchElementException()
}
@@ -118,7 +118,7 @@ class ExecutePlanResponseReattachableIterator(
// Record last returned response, to know where to restart in case of reattach.
lastReturnedResponseId = Some(ret.getResponseId)
if (ret.hasResultComplete) {
- responseComplete = true
+ resultComplete = true
releaseExecute(None) // release all
} else {
releaseExecute(lastReturnedResponseId) // release until this response
@@ -127,7 +127,7 @@ class ExecutePlanResponseReattachableIterator(
}
override def hasNext(): Boolean = synchronized {
- if (responseComplete) {
+ if (resultComplete) {
// After response complete response
return false
}
@@ -144,10 +144,10 @@ class ExecutePlanResponseReattachableIterator(
// Graceful reattach:
// If iterator ended, but there was no ResultComplete, it means that there is more,
// and we need to reattach.
- if (!hasNext && !responseComplete) {
+ if (!hasNext && !resultComplete) {
do {
iterator = rawBlockingStub.reattachExecute(createReattachExecuteRequest())
- assert(!responseComplete) // shouldn't change...
+ assert(!resultComplete) // shouldn't change...
hasNext = iterator.hasNext()
// It's possible that the new iterator will be empty, so we need to loop to get another.
// Eventually, there will be a non empty iterator, because there's always a ResultComplete
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org