mengw15 commented on code in PR #9049: URL: https://github.com/apache/texera/pull/9049#discussion_r4331025356
########## sql/updates/52.sql: ########## @@ -0,0 +1,40 @@ +/* + * 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. + */ + +\c texera_db + +SET search_path TO texera_db; Review Comment: Both runners strip `\c` before executing the file (`sql/docker-compose.yml` for Liquibase, and `bin/local-dev/main.sh`), as for every other script in `sql/updates`. The Liquibase runner strips `SET search_path` too, though, so the unqualified names would have failed there; 6305d59c7a7b5aa4527653833a94d151de92c136 schema-qualifies them as 46.sql and 49.sql do. ########## amber/src/main/scala/org/apache/texera/web/service/ExecutionResultService.scala: ########## @@ -92,11 +93,24 @@ object ExecutionResultService { pojo.setWorkflowExecutionId(executionId.id.toInt) pojo.setGlobalPortId(evt.globalPortId.serializeAsString) pojo.setResultUri(evt.uri.toString) + pojo.setOutputMode(toOutputModeEnum(evt.mode)) new OperatorPortExecutionsDao( SqlServer.getInstance().createDSLContext().configuration() ).insert(pojo) } + /** + * The stored form of a port's output mode. Recorded with the URI so that a finished + * execution's results can be listed without the engine's physical plan (#8994). + */ + private[service] def toOutputModeEnum(mode: OutputMode): OutputModeEnum = + mode match { + case OutputMode.SET_SNAPSHOT => OutputModeEnum.SET_SNAPSHOT + case OutputMode.SET_DELTA => OutputModeEnum.SET_DELTA + case OutputMode.SINGLE_SNAPSHOT => OutputModeEnum.SINGLE_SNAPSHOT + case OutputMode.Unrecognized(_) => null + } Review Comment: Done in 6305d59c7a7b5aa4527653833a94d151de92c136: returns `Option`, with `.orNull` at the jOOQ setter. ########## 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 of the corresponding Iceberg document in the database. + * + * @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. + */ Review Comment: Reworded in 6305d59c7a7b5aa4527653833a94d151de92c136. -- 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]
