mengw15 opened a new pull request, #9636:
URL: https://github.com/apache/texera/pull/9636

   ### What changes were proposed in this PR?
   
   `IcebergUtil.loadTableMetadata` and the Python worker's 
`load_table_metadata` returned `None` for any failure, so a catalog that could 
not be read looked like a deleted table: result-service answered 404, or 200 
with an empty page, and counts and reads came back empty. They now return 
`None` only when the table or its namespace does not exist, and raise anything 
else.
   
   `openDocument` throws `DocumentNotFoundException`, a subtype of the 
`IllegalArgumentException` it always threw, so result-service and 
`WorkflowResource` match the type instead of the message.
   
   One lookup stays best effort. Once an `IcebergDocument` iterator has 
returned every row of the table it resolved, it looks for rows committed since. 
Failing that should not fail a read that is complete, so it logs a warning and 
ends, as it did before.
   
   **Behavior change in the engine.** When the catalog fails as a reader first 
resolves its materialized input, the reader now fails instead of giving the 
operator no input. As when opening the document fails today, the JVM reader 
thread rethrows and the Python reader logs, and neither ends its channel, so 
the operator waits rather than producing a wrong result.
   
   ### Any related issues, documentation, discussions?
   
   Closes #9635.
   
   ### How was this PR tested?
   
   - Written first, and red on main: `ResultResourceSpec` answered 404 and 200 
where it expects 500, `IcebergDocumentSpec` counted 0 and read empty, 
`IcebergUtilSpec` got `None`, and three Python cases did not raise.
   - `IcebergUtilSpec` pinned the old behavior ("return None when loading table 
metadata fails"). It now covers a missing table or namespace, and every other 
failure.
   - Removing the best-effort lookup turns its `IcebergDocumentSpec` case red.
   - The WorkflowCore suite (889 tests), `ResultResourceSpec`, seven amber 
specs (250 tests) and the Python storage suite (144 tests, against a local 
Postgres) pass. scalafmt, scalafix and ruff are clean.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (claude-opus-5-5)
   


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