flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-4294) Allow access of composite type fields
Date Sun, 16 Oct 2016 18:21:20 GMT

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

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

Github user twalthr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2319#discussion_r83556835
  
    --- Diff: docs/dev/table_api.md ---
    @@ -1656,6 +1656,29 @@ temporalOverlaps(TIMEPOINT, TEMPORAL, TIMEPOINT, TEMPORAL)
           </td>
         </tr>
     
    +    <tr>
    +      <td>
    +        {% highlight java %}
    +ANY.flatten()
    +{% endhighlight %}
    +      </td>
    +      <td>
    +        <p>Converts a Flink composite type (such as Tuple, POJO, etc.) and all
of its subtypes into a flat representation where every subtype is a separate field.</p>
    +      </td>
    +    </tr>
    +
    +    <tr>
    +      <td>
    +        {% highlight java %}
    +COMPOSITE.get(STRING)
    --- End diff --
    
    I thought we only agreed that `getField` is too long. Personally I like this approach
more because it can be found in the expression DSL and has a Scala doc; and it doesn't add
further case distinction logic to the validation layer. Since "$" is valid part of Java identifier
we would also restrict the field naming of POJOs. If there is a consensus I can change it
to "field$substring".


> Allow access of composite type fields
> -------------------------------------
>
>                 Key: FLINK-4294
>                 URL: https://issues.apache.org/jira/browse/FLINK-4294
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: Timo Walther
>            Assignee: Timo Walther
>
> Currently all Flink CompositeTypes are treated as GenericRelDataTypes. It would be better
to access individual fields of composite types, too. e.g.
> {code}
> SELECT composite.name FROM composites
> SELECT tuple.f0 FROM tuples
> 'f0.getField(0)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message