PG1204 commented on code in PR #8552:
URL: https://github.com/apache/texera/pull/8552#discussion_r4049971485


##########
frontend/src/app/workspace/service/heatmap/heatmap-stats-restore.service.ts:
##########
@@ -0,0 +1,105 @@
+/**
+ * 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.
+ */
+
+import { Injectable } from "@angular/core";
+import { EMPTY, Observable, of } from "rxjs";
+import { catchError, map, switchMap } from "rxjs/operators";
+import { WorkflowExecutionsService } from 
"../../../dashboard/service/user/workflow-executions/workflow-executions.service";
+import { WorkflowExecutionsEntry } from 
"../../../dashboard/type/workflow-executions-entry";
+import { WorkflowActionService } from 
"../workflow-graph/model/workflow-action.service";
+import { WorkflowStatusService } from 
"../workflow-status/workflow-status.service";
+import { ExecuteWorkflowService } from 
"../execute-workflow/execute-workflow.service";
+import { isNotInExecution } from "../../types/execute-workflow.interface";
+import { loadPersistedHeatmapView } from "./heatmap-overlay-persistence";
+import { toOperatorRuntimeStatusMap } from "./runtime-statistics-mapper";
+
+/** Persisted execution status code for a completed run 
(EXECUTION_STATUS_CODE). */
+const EXECUTION_COMPLETED_CODE = 3;

Review Comment:
   Fixed. pickLatestRun now filters on EXECUTION_STATUS_CODE[e.status] === 
ExecutionState.Completed, and the literal is gone and the import was already on 
line 24, as you said.
   
   I left operatorStateFromStatusCode in the mapper alone: it reads the same 
engine codes but maps to OperatorState, deliberately collapsing Failed/Killed 
to Uninitialized. Going through the table would add an ExecutionState -> 
OperatorState hop rather than remove a copy. Happy to revisit if you'd rather 
both derive from one source.



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