You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Will (JIRA)" <ji...@apache.org> on 2018/08/09 17:49:00 UTC

[jira] [Created] (FLINK-10116) createComparator fails on case class with Unit type fields prior to the join-keyl

Will created FLINK-10116:
----------------------------

             Summary: createComparator fails on case class with Unit type fields prior to the join-keyl
                 Key: FLINK-10116
                 URL: https://issues.apache.org/jira/browse/FLINK-10116
             Project: Flink
          Issue Type: Bug
    Affects Versions: 1.6.0, 1.3.3
            Reporter: Will
         Attachments: JobFail.scala, JobPass.scala

h1. Overview

When joining between case classes, if the attribute representing the join-key comes after Unit definition of fields (that are not being used) the join will fail with the error
{quote}{{Exception in thread "main" java.lang.IllegalArgumentException: Could not add a comparator for the logicalkey field index 0.}}
{{ at org.apache.flink.api.common.typeutils.CompositeType.createComparator(CompositeType.java:162)}}
{{ at org.apache.flink.optimizer.postpass.JavaApiPostPass.createComparator(JavaApiPostPass.java:293)}}
{{ at org.apache.flink.optimizer.postpass.JavaApiPostPass.traverse(JavaApiPostPass.java:193)}}
{quote}
Using TypeInformation keys does not exhibit the same issue. Initial debugging suggests that when calculating the index of the key for strings doesn't count Unit elements, however they are included during iteration in CompositeType.createComparator which leads to the search failing on the key appearing to be a Unit type.
h1. Code Examples to Reproduce

[^JobFail.scala]

[^JobPass.scala]

 

 



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