[FLINK-37923][sql] Introduce VARIANT type and PARSE_JSON to Flink SQL
What is the purpose of the change
This pull request introduces the Variant data structure to represent semi-structured data, a new SQL type variant, and a builtin method to parse json string to the variant type.
Brief change log
- Patch calcite to support variant type
- Introduce Variant and BinaryVariant
- Introduce variant type and PARSE_JSON to Flink SQL
Verifying this change
This change added tests and can be verified.
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 - 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? JavaDocs
CI report:
- 9513d8eeb67c4b79c2b93437933a28a0630807f3 Azure: SUCCESS
Bot commands
The @flinkbot bot supports the following commands:@flinkbot run azurere-run the last Azure build
@twalthr Thanks for the detailed review! I updated the PR accordingly, and all the comments should be addressed. Please take another look.
Thanks @Sxnan. I added it for my list for tomorrow. I'm sure it can still make it before the feature freeze.
Hi @twalthr, could you take another look at your earliest convenience, in case we need to make some final adjustment to the PR before the feature freeze tomorrow.
Hi @twalthr, thanks for the review! I updated the PR accordingly in the last two fixup commits. Please take another look.
Fixup commits are squashed. Will merge after the test passes.
@gustavodemorais Yes, it will be covered later in another PR.