GitHub user suez1224 opened a pull request:
https://github.com/apache/flink/pull/5367
[FLINK-7923][Table API & SQL] Support field access of composite array
element in SQL
Note: This is based on FLINK-7934, will rebase once FLINK-7934 is resolved.
## What is the purpose of the change
Support field access of composite array element in SQL.
## Brief change log
- add handling to calcite dot operator to support field access of
composite array element in SQL
- add unittests to verify that it works for tuple array, row array, pojo
array and case class array
## Verifying this change
This change added tests and can be verified as follows:
- *Added unittests to verify the query plan*
- *Added integration tests for batch/streaming for pojo/case
class/tuple/row type*
## 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)`: (no)
- The serializers: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Yarn/Mesos, 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? (not applicable)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/suez1224/flink flink-7923
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5367.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5367
----
commit 9e915e4144703582843b0f31bffc1481648d0119
Author: Shuyi Chen <shuyi@...>
Date: 2018-01-10T00:52:56Z
Upgrade to Calcite 1.15
commit 7a8328e4750ae95196f0b8ba20c6dff22c59ec08
Author: Shuyi Chen <shuyi@...>
Date: 2018-01-25T23:36:36Z
Support access of subfields of Array element if the element is a composite
type (e.g. case class, pojo, tuple or row).
----
---