mengw15 commented on code in PR #9049:
URL: https://github.com/apache/texera/pull/9049#discussion_r4416930506
##########
amber/src/main/scala/org/apache/texera/web/service/ExecutionResultService.scala:
##########
@@ -447,6 +461,11 @@ class ExecutionResultService(
globalPortIdOption.get,
opStorage.getTotalFileSize
)
+ WorkflowExecutionsResource.updateResultCount(
+ executionId,
+ globalPortIdOption.get,
+ info.tupleCount
+ )
Review Comment:
Thanks. #9054, merged after your review, now builds the result store from
each operator's first port only, so `info.tupleCount` is port 0's count and
matches its size. It stays an `Int`, like the store and the pagination reply.
Other ports are still not recorded, as with `result_size`; the description now
says so.
##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/user/workflow/WorkflowExecutionsResource.scala:
##########
@@ -413,6 +413,26 @@ object WorkflowExecutionsResource {
.execute()
}
+ /**
+ * Updates the row count stored for this port's result in
operator_port_executions.
+ *
+ * @param eid Execution ID associated with the result.
+ * @param globalPortId Global port identifier for the operator output.
+ * @param count Number of rows in the result.
+ */
+ def updateResultCount(
+ eid: ExecutionIdentity,
+ globalPortId: GlobalPortIdentity,
+ count: Long
+ ): Unit = {
+ context
+ .update(OPERATOR_PORT_EXECUTIONS)
+ .set(OPERATOR_PORT_EXECUTIONS.RESULT_COUNT,
java.lang.Long.valueOf(count))
+ .where(OPERATOR_PORT_EXECUTIONS.WORKFLOW_EXECUTION_ID.eq(eid.id.toInt))
+
.and(OPERATOR_PORT_EXECUTIONS.GLOBAL_PORT_ID.eq(globalPortId.serializeAsString))
+ .execute()
+ }
Review Comment:
Done in af143f821760bc243a25e74f600c66e398e5ac2d: merged into
`updateResultSizeAndCount`, one UPDATE for both.
--
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]