Airblader opened a new pull request #17549: URL: https://github.com/apache/flink/pull/17549
## What is the purpose of the change This adds support for `JSON_OBJECTAGG` in SQL, Table API, and PyFlink. supersedes #11369 ## Brief change log * Introduce a test base for built-in aggregate functions. This is akin to the one we have for scalar functions, but a bit more general to allow providing arbitrarily many rows of input data. * Implement `JSON_OBJECTAGG`. This has been tricky at times, because for SQL the call is hard-coded into the parser, and aggregate functions are just not easy. After discussion we decided to apply a similar workaround to what Calcite does, which is actually implement two separate functions (for NULL / ABSENT ON NULL). This avoids shipping symbols across the network for each record, and also a bunch of issues in the current stack related to that, such as symbols being represented as raw types of `Enum` etc. We also add a new rule here which wraps arguments of `JSON_OBJECTAGG` (and soon `JSON_ARRAYAGG`) into `JSON_STRING`. This tremendously simplifies the runtime implementation for the aggregation function as it only needs to deal with strings and can simply insert them as raw values. ## Verifying this change TODO ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (yes / no) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / no) - The serializers: (yes / no / don't know) - The runtime per-record code paths (performance sensitive): (yes / no / don't know) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know) - The S3 file system connector: (yes / no / don't know) ## Documentation - Does this pull request introduce a new feature? (yes / no) - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented) -- 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