You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "jdesjean (via GitHub)" <gi...@apache.org> on 2023/08/11 17:55:31 UTC
[GitHub] [spark] jdesjean commented on a diff in pull request #42454: [SPARK-44776] Add ProducedRowCount to SparkListenerConnectOperationFinished
jdesjean commented on code in PR #42454:
URL: https://github.com/apache/spark/pull/42454#discussion_r1291566570
##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/execution/SparkConnectPlanExecution.scala:
##########
@@ -120,11 +121,12 @@ private[execution] class SparkConnectPlanExecution(executeHolder: ExecuteHolder)
response.setArrowBatch(batch)
responseObserver.onNext(response.build())
numSent += 1
+ totalNumRows += count
}
dataframe.queryExecution.executedPlan match {
case LocalTableScanExec(_, rows) =>
- executePlan.eventsManager.postFinished()
Review Comment:
I realize we don't have a test case for LocalTableScanExec. We should add one.
Not sure on the exact syntax
```
val request = proto.ExecutePlanRequest
.newBuilder()
.setPlan(proto.Plan
.newBuilder()
.setRoot(proto.Relation
.newBuilder()
.getLocalRelationBuilder
.setSchema(new StructType()
.add("id", "long").json)
.setData(?)
.build())
.build())
.setUserContext(context)
.setSessionId(UUID.randomUUID.toString())
.build()
```
totalNumRows will only be populated after sendBatch. We'll need to move postFinished below to accommodate this.
--
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-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org