auroflow opened a new pull request, #29486:
URL: https://github.com/apache/flink/pull/29486

   ## What is the purpose of the change
   
   Fix [FLINK-41001](https://issues.apache.org/jira/browse/FLINK-41001): the 
OpenAI provider rejects model input schemas declared as `CHAR(n)`, bounded 
`VARCHAR(n)`, or `STRING NOT NULL` because it requires an exact nullable, 
unbounded `STRING` type.
   
   Accept compatible character string types in the shared Java provider 
validation so both chat and embedding models benefit through SQL and Table API.
   
   ## Brief change log
   
   - Accept `CHAR` and `VARCHAR` input types regardless of length or 
nullability.
   - Preserve output schema, column count, and metadata validation.
   - Extend existing model tests with prediction planning coverage for 
compatible input types and invalid output types.
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
   - Chat model tests cover nullable and non-nullable `CHAR`, bounded 
`VARCHAR`, and unbounded `STRING` inputs through SQL and anonymous-model Table 
API calls. An embedding model test covers bounded, non-nullable string input.
   - Parameterized output validation tests retain the exact output type 
requirement. All added cases only plan queries; they add no MiniCluster jobs.
   - The new input cases reproduce the original validation failures without the 
fix. The complete OpenAI model suite passed on the new base: **32 tests**.
   - The standalone SQL reproducer from the Jira description plans successfully 
with the rebuilt provider.
   - Spotless, Checkstyle, and the root reactor package build with tests 
skipped passed. Full `clean verify` has not been run.
   
   ## Does this pull request potentially affect one of the following parts:
   
   - Dependencies (does it add or upgrade a dependency): no
   - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
   - The serializers: no
   - The runtime per-record code paths (performance sensitive): no
   - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
   - The S3 file system connector: no
   
   ## Documentation
   
   - Does this pull request introduce a new feature? no
   - If yes, how is the feature documented? not applicable
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Codex (GPT-6)
   


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