raminqaf opened a new pull request, #26806: URL: https://github.com/apache/flink/pull/26806
## What is the purpose of the change This pull request implements the `OBJECT_UPDATE` built-in function as part of [FLIP-520](https://cwiki.apache.org/confluence/display/FLINK/FLIP-520%3A+Simplify+StructuredType+handling): Simplify StructuredType handling. The function allows users to update existing fields in structured objects by providing key-value pairs, enabling mutation operations on structured types in both SQL and Table API without requiring custom UDFs. ## Brief change log - Added `ObjectUpdateInputTypeStrategy` for validating input arguments (structured object + key-value pairs) - Added `ObjectUpdateTypeStrategy` for inferring return types (same as input structured type) - Implemented `ObjectUpdateFunction` runtime function for performing field updates - Added `OBJECT_UPDATE` to `BuiltInFunctionDefinitions` with proper type inference strategies - Added Table API expression support via `objectUpdate()` method on expressions - Updated SQL and Table API documentation with examples and usage patterns - Added comprehensive validation for field names, types, and compatibility checking - Implemented proper error handling for non-existent fields and type mismatches ## Verifying this change This change added tests and can be verified as follows: - Added unit tests in `ObjectUpdateInputTypeStrategyTest` for input validation scenarios - Added integration tests in `StructuredFunctionsITCase` for end-to-end SQL functionality ## 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 (new built-in function) - The serializers: no - The runtime per-record code paths (performance sensitive): yes (new scalar function execution) - 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 and comprehensive JavaDoc comments) -- 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]
