aglinxinyuan commented on code in PR #9493:
URL: https://github.com/apache/texera/pull/9493#discussion_r4595769168
##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/user/warehouse/WarehouseResource.scala:
##########
@@ -212,7 +213,7 @@ class WarehouseResource(client: LakekeeperClient, enabled:
Boolean) extends Lazy
try {
row.store()
// created_at is filled by the DB default; fetch it back before
serializing.
- row.refresh()
+ row.refresh(dashboardFields: _*)
Review Comment:
Done in c447bd874b. `create` now refreshes only `USER_WAREHOUSE.CREATED_AT`,
`dashboardFields` is a plain `val` used by `status`, and `delete` and
`resolveLakekeeperWarehouseName` read their column with `.fetchOne(field)`.
##########
amber/src/main/scala/org/apache/texera/web/service/ResultExportService.scala:
##########
@@ -135,10 +129,7 @@ class ResultExportService(workflowIdentity:
WorkflowIdentity, computingUnitId: I
def exportToLocal(request: ResultExportRequest): Response = {
if (request.operators.size > 1) {
val (zipStream, zipFileNameOpt) = exportOperatorsAsZip(request)
- if (zipStream == null) {
- throw new RuntimeException("Zip stream is null")
- }
- val fileName = zipFileNameOpt.getOrElse("operators.zip")
+ val fileName = zipFileNameOpt.get
Review Comment:
Done in c447bd874b. `exportOperatorsAsZip` now returns `(StreamingOutput,
String)` and `exportOperatorResultAsStream` returns `Option[(StreamingOutput,
String)]`, so both `.get`s and the null check are gone and the no-stream cases
assert `shouldBe None`; `streamDocumentAsParquetZip` uses `Using.resource` too.
##########
amber/src/main/scala/org/apache/texera/web/service/WorkflowService.scala:
##########
@@ -177,22 +176,6 @@ class WorkflowService(
}
)
- var lastCompletedLogicalPlan: Option[LogicalPlan] = Option.empty
-
- executionService.subscribe { executionService: WorkflowExecutionService =>
- {
- executionService.executionStateStore.metadataStore.registerDiffHandler {
- (oldState, newState) =>
- {
- if (oldState.state != COMPLETED && newState.state == COMPLETED) {
- lastCompletedLogicalPlan =
Option.apply(executionService.workflow.logicalPlan)
- }
- Iterable.empty
- }
- }
- }
- }
Review Comment:
Done in c447bd874b — removed the `lastCompletedLogicalPlan` bullet from
`WorkflowServiceSpec`.
--
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]