[ https://issues.apache.org/jira/browse/FLINK-4721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Flink Jira Bot updated FLINK-4721: ---------------------------------- Labels: stale-minor (was: ) > Getting exception when using a key of type Option[String] in distinct > operation > ------------------------------------------------------------------------------- > > Key: FLINK-4721 > URL: https://issues.apache.org/jira/browse/FLINK-4721 > Project: Flink > Issue Type: Bug > Components: API / Scala, API / Type Serialization System > Affects Versions: 1.1.2 > Reporter: Ashish Walia > Priority: Minor > Labels: stale-minor > > Selecting distinct records from the input dataset where one of the keys is > Option[String] and it's value being None most of the times is leading to this > exception :- > Exception in thread "main" java.lang.RuntimeException: Comparator > org.apache.flink.api.scala.typeutils.OptionTypeComparator specifies an > invalid length for the normalized key: -2147483648 > at > org.apache.flink.api.java.typeutils.runtime.PojoComparator.<init>(PojoComparator.java:95) > at > org.apache.flink.api.java.typeutils.PojoTypeInfo$PojoTypeComparatorBuilder.createTypeComparator(PojoTypeInfo.java:400) > at > org.apache.flink.api.common.typeutils.CompositeType.createComparator(CompositeType.java:167) > at > org.apache.flink.optimizer.postpass.JavaApiPostPass.createComparator(JavaApiPostPass.java:293) > at > org.apache.flink.optimizer.postpass.JavaApiPostPass.traverse(JavaApiPostPass.java:169) > at > org.apache.flink.optimizer.postpass.JavaApiPostPass.traverseChannel(JavaApiPostPass.java:267) > at > org.apache.flink.optimizer.postpass.JavaApiPostPass.traverse(JavaApiPostPass.java:173) > at > org.apache.flink.optimizer.postpass.JavaApiPostPass.traverseChannel(JavaApiPostPass.java:267) > at > org.apache.flink.optimizer.postpass.JavaApiPostPass.traverse(JavaApiPostPass.java:97) > at > org.apache.flink.optimizer.postpass.JavaApiPostPass.postPass(JavaApiPostPass.java:81) > at org.apache.flink.optimizer.Optimizer.compile(Optimizer.java:521) > at org.apache.flink.optimizer.Optimizer.compile(Optimizer.java:398) > at > org.apache.flink.client.LocalExecutor.executePlan(LocalExecutor.java:185) > at > org.apache.flink.api.java.LocalEnvironment.execute(LocalEnvironment.java:91) > at > org.apache.flink.api.scala.ExecutionEnvironment.execute(ExecutionEnvironment.scala:651) -- This message was sent by Atlassian Jira (v8.3.4#803005)