raminqaf opened a new pull request, #26704: URL: https://github.com/apache/flink/pull/26704
## What is the purpose of the change This pull request implements the `OBJECT_OF` function as specified in [FLIP-520](https://cwiki.apache.org/confluence/display/FLINK/FLIP-520%3A+Simplify+StructuredType+handling) to enable creation of structured types in SQL and Table API. The function allows users to construct structured objects from key-value pairs without requiring UDFs, making structured type creation SQL-serializable and improving the overall usability of structured types in Flink. ## Brief change log - *Added `OBJECT_OF` function definition to `BuiltInFunctionDefinitions`* - *Implemented `ObjectOfInputTypeStrategy` for input validation (odd argument count, string keys, unique field names)* - *Implemented `ObjectOfTypeStrategy` for output type inference (creates structured types)* - *Added `ObjectOfFunction` runtime implementation that creates `RowData` from key-value pairs* - *Enhanced `Expressions.java` with `objectOf()` methods for Table API support* - *Added Python API support with `object_of()` function in `expressions.py`* - *Updated SQL functions documentation with `OBJECT_OF` function details* ## Verifying this change This change added tests and can be verified as follows: - *Added unit tests for `ObjectOfInputTypeStrategy` to validate argument count, type validation, and field name uniqueness* - *Added integration tests in `StructuredFunctionsITCase` to test end-to-end functionality* - *Verified SQL usage: `SELECT OBJECT_OF('com.example.User', 'name', 'Bob', 'age', 42)`* - *Verified Table API usage: `objectOf(User.class, "name", "Bob", "age", 42)`* ## 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)`: **yes** (additions to `Expressions.java` and `BuiltInFunctionDefinitions`) - 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? **yes** - If yes, how is the feature documented? **docs / JavaDocs** (updated SQL functions documentation, comprehensive JavaDocs for all new classes and methods, Python API documentation) -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org