flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Pompermaier <pomperma...@okkam.it>
Subject POJO coCroup on null value
Date Thu, 02 Jul 2015 17:10:41 GMT
Hi to all,

I'd like to join 2 datasets of POJO, let's say for example:

Person:
 - name
 - birthPlaceId

Place:
 - id
 - name

I'd like to do
people.coCoGroup(places).where("birthPlaceId").equalTo("id").with(...)

However, not all people have a birthPlaceId value in my use case..so I get
a NullPointer.
Am I using the wrong operator for this?
This is the stackTrace:

java.lang.RuntimeException: A NullPointerException occured while accessing
a key field in a POJO. Most likely, the value grouped/joined on is null.
Field name: birthPlaceId
at
org.apache.flink.api.java.typeutils.runtime.PojoComparator.hash(PojoComparator.java:217)
at
org.apache.flink.runtime.operators.shipping.OutputEmitter.hashPartitionDefault(OutputEmitter.java:175)
at
org.apache.flink.runtime.operators.shipping.OutputEmitter.selectChannels(OutputEmitter.java:132)
at
org.apache.flink.runtime.operators.shipping.OutputEmitter.selectChannels(OutputEmitter.java:28)
at
org.apache.flink.runtime.io.network.api.writer.RecordWriter.emit(RecordWriter.java:78)
at
org.apache.flink.runtime.operators.shipping.OutputCollector.collect(OutputCollector.java:65)

Best,
Flavio

Mime
View raw message