[ 
https://issues.apache.org/jira/browse/FLINK-7923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16340658#comment-16340658
 ] 

ASF GitHub Bot commented on FLINK-7923:
---------------------------------------

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).

----


> SQL parser exception when accessing subfields of a Composite element in an 
> Object Array type column
> ---------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-7923
>                 URL: https://issues.apache.org/jira/browse/FLINK-7923
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API &amp; SQL
>    Affects Versions: 1.4.0
>            Reporter: Rong Rong
>            Assignee: Shuyi Chen
>            Priority: Major
>
> Access type such as:
> {code:SQL}
> SELECT 
>   a[1].f0 
> FROM 
>   MyTable
> {code}
> will cause problem. 
> See following test sample for more details:
> https://github.com/walterddr/flink/commit/03c93bcb0fb30bd2d327e35b5e244322d449b06a



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to