swapna267 opened a new pull request, #27600:
URL: https://github.com/apache/flink/pull/27600
## What is the purpose of the change
Usecases:
1. Extracting a Variant Field as Row MapType/ArrayType. A Map is just nested
Variant Objects. We need to be able to extract field names at Variant top level
in-order to read it as MapType. For Arrays, we need size to construct fixed
size arrays.
2. Automatic inference of Sink Table schema from Variant column type.
## Brief change log
This PR adds two new accessor methods to the Variant interface:
getArraySize() - Returns the size of an array variant
getFieldNames() - Returns the field names of an object variant (top-level
only)
## Verifying this change
Extended the existing tests to test the new methods.
## 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
--
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]