mengw15 commented on code in PR #9049:
URL: https://github.com/apache/texera/pull/9049#discussion_r4381346761


##########
sql/updates/52.sql:
##########
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+-- Names are schema-qualified because the two runners disagree about the 
search path: the
+-- liquibase runner in sql/docker-compose.yml strips `SET search_path` out of 
these files before
+-- applying them, while bin/local-dev.sh keeps it.
+
+\c texera_db

Review Comment:
   Keeping it for consistency: 51 of the 52 scripts in `sql/updates` have it, 
and both runners strip it before executing (see 
https://github.com/apache/texera/pull/9049#discussion_r4330064423).



##########
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:
   Keeping `Long`, like `updateResultSize` beside it: the insert already leaves 
`result_count` null, and the only caller always has a count.



-- 
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]

Reply via email to