featzhang created FLINK-39631:
---------------------------------
Summary: Integrate GPU sidecar inference with Table/SQL and
provide end-to-end example
Key: FLINK-39631
URL: https://issues.apache.org/jira/browse/FLINK-39631
Project: Flink
Issue Type: Sub-task
Components: Table SQL / API, Examples, Documentation
Reporter: featzhang
h2. Background
Streaming SQL users should be able to invoke the GPU sidecar without
writing DataStream code. Flink's existing scalar and table-function UDF
surfaces are the natural place to expose inference: users declare the
function once via DDL, then reference it from arbitrary SQL statements.
This sub-task closes the loop by delivering a user-facing Table / SQL
integration plus an end-to-end example and documentation.
h2. Scope of this sub-task
* Add {{GpuInferScalarFunction}} in {{flink-table-api-java-bridge}} (or
equivalent) that forwards inputs to the sidecar via the async client
from the earlier sub-task. The function is marked asynchronous so that
the planner generates an async-lookup-style execution plan.
* Register the function via standard Flink UDF DDL; an optional SQL
hint selects a non-default sidecar endpoint for A / B scenarios.
* Add an end-to-end example under {{flink-examples-streaming}} that reads
from a generator source, runs inference, and writes to a print sink.
The example runs out of the box against the mock sidecar.
* Add user documentation under {{docs/content/docs}} covering
configuration, deployment topology, metrics, and a short
troubleshooting checklist.
h2. Out of scope
* Planner-level optimisations such as auto-batching of SQL projections
into a single sidecar call. That can be tackled once real workloads
surface concrete patterns.
h2. Acceptance criteria
* SQL client session can create the function and run
{{SELECT gpu_infer(x) FROM src}} end-to-end against the mock sidecar.
* Documentation builds without warnings and the example is referenced
from it.
* Coverage of the new UDF on CI: at least one integration test under
{{flink-table-planner}}.
h2. Affected modules
* {{flink-table-api-java-bridge}}
* {{flink-table-planner}}
* {{flink-examples-streaming}}
* {{docs}}
h2. Links
Parent: see umbrella issue linked to this sub-task.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)