Repository navigation
[core][python] Add asynchronous prediction REST APIs - #11012
Open
XiaoHongbo-Hope wants to merge 41 commits into
Open
XiaoHongbo-Hope wants to merge 41 commits into
XiaoHongbo-Hope wants to merge 41 commits into
Conversation
XiaoHongbo-Hope
force-pushed
the
codex/prediction-job-api
branch
4 times, most recently
from
November 16, 2026 08:38
b1dd30d to
062f66b
Compare
Add a provider-neutral asynchronous table prediction contract for Java and PyPaimon REST catalogs.
XiaoHongbo-Hope
force-pushed
the
codex/prediction-job-api
branch
from
November 16, 2026 08:54
062f66b to
ba1769d
Compare
XiaoHongbo-Hope
marked this pull request as ready for review
November 18, 2026 09:12
Contributor
|
Thanks for putting together the Java and Python prediction contracts. I ran the client and REST-contract tests from this head. They exercise request encoding and mocked lifecycle responses. The proposed workflow depends on a provider to submit and execute an actual job, read the pinned snapshot, publish the result table, and handle cancellation. This change leaves that provider work outside its scope, so the current patch does not give a Paimon user a deployable prediction workflow. I'm closing this version. Please bring it back with a linked provider implementation or an executable reference integration that demonstrates submission through result readback, including the snapshot and cancellation behavior. |
XiaoHongbo-Hope
marked this pull request as ready for review
November 19, 2026 13:34
XiaoHongbo-Hope
marked this pull request as draft
November 19, 2026 13:37
XiaoHongbo-Hope
marked this pull request as ready for review
November 20, 2026 07:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Add provider-neutral asynchronous predictions for registered Models. The Java and Python REST clients are backed by an executable local reference provider that reads the recorded source snapshot, writes a managed Paimon result table, and handles cancellation.
API
table.predict()submits a prediction and returnsPredictionWait.result(timeout)polls until the deadline. The deadline is checked between REST requests and does not cancel the server-side prediction./v1/{prefix}/predictions.idempotencyTokenby default; callers may supply one for retries.x-request-idremains a tracing identifier.scan.snapshot-idorscan.tag-name.outputis optional. The default managed table contains source identity columns,response, anderror.Strict request cancellation and an end-to-end HTTP deadline are generic client concerns and are out of scope.
Lifecycle
state:PENDING,RUNNING,TERMINATING, orTERMINATED.terminationDetailscontains the result code and optional message.startTimeandendTimedescribe execution time.TERMINATING.Industry references
responseanderrorPaimon-specific choices are the Catalog-scoped resource, structured Model identifier, table source, and snapshot/tag options.
Reference integration
The local REST Catalog reference provider executes a deterministic prediction against a real Paimon source table. Its integration test verifies:
TERMINATED/CANCELEDwithout publishing an output table.Tests
MockRESTCatalogTest: 238 passed.git diff --checkpassed.