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

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

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

    https://github.com/apache/flink/pull/572#discussion_r28697764
  
    --- Diff: 
flink-java/src/main/java/org/apache/flink/api/java/operators/Keys.java ---
    @@ -274,24 +274,31 @@ private static int 
countNestedElementsBefore(CompositeType<?> compositeType, int
                 * Create ExpressionKeys from String-expressions
                 */
                public ExpressionKeys(String[] expressionsIn, 
TypeInformation<T> type) {
    -                   if(!(type instanceof CompositeType<?>)) {
    -                           throw new IllegalArgumentException("Key 
expressions are only supported on POJO types and Tuples. "
    -                                           + "A type is considered a POJO 
if all its fields are public, or have both getters and setters defined");
    -                   }
    -                   CompositeType<T> cType = (CompositeType<T>) type;
    -                   
    -                   String[] expressions = removeDuplicates(expressionsIn);
    -                   if(expressionsIn.length != expressions.length) {
    -                           LOG.warn("The key expressions contained 
duplicates. They are now unique");
    -                   }
    -                   // extract the keys on their flat position
    -                   keyFields = new 
ArrayList<FlatFieldDescriptor>(expressions.length);
    -                   for (int i = 0; i < expressions.length; i++) {
    -                           List<FlatFieldDescriptor> keys = 
cType.getFlatFields(expressions[i]); // use separate list to do a size check
    -                           if(keys.size() == 0) {
    -                                   throw new 
IllegalArgumentException("Unable to extract key from expression 
'"+expressions[i]+"' on key "+cType);
    +                   if (type instanceof AtomicType) {
    --- End diff --
    
    can you add a `null` check for `expressionsIn`?


> Use complete element as join key.
> ---------------------------------
>
>                 Key: FLINK-703
>                 URL: https://issues.apache.org/jira/browse/FLINK-703
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: GitHub Import
>            Assignee: Chiwan Park
>            Priority: Trivial
>              Labels: github-import
>             Fix For: pre-apache
>
>
> In some situations such as semi-joins it could make sense to use a complete 
> element as join key. 
> Currently this can be done using a key-selector function, but we could offer 
> a shortcut for that.
> This is not an urgent issue, but might be helpful.
> ---------------- Imported from GitHub ----------------
> Url: https://github.com/stratosphere/stratosphere/issues/703
> Created by: [fhueske|https://github.com/fhueske]
> Labels: enhancement, java api, user satisfaction, 
> Milestone: Release 0.6 (unplanned)
> Created at: Thu Apr 17 23:40:00 CEST 2014
> State: open



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

Reply via email to