Re: Serializing NULLs

Posted by Deepak Sharma on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Serializing-NULLs-tp10700p10720.html

Hi Matt
Can you please share the code like how you are mapping null to long?

Thanks
Deepak

On Tue, Dec 20, 2016 at 9:25 PM, Matt <[hidden email]> wrote:

In the meanwhile I've solved the issue by creating a POJO class where null is just Long.MIN_VALUE, that with a custom equals() made the trick. I guess it's not as fast as de/serializing Double though.

If you need any other information let me know.

Regards,
Matt

On Tue, Dec 20, 2016 at 6:46 AM, Stephan Ewen <[hidden email]> wrote:
The "null" support in some types is not fully developed. However in that case I am wondering why it does not work. Can you share the stack trace, so we can take a look at the serializer?



On Mon, Dec 19, 2016 at 9:56 PM, Matt <[hidden email]> wrote:
Hello list,

I'm getting this error:

java.lang.RuntimeException: Could not forward element to next operator
...
Caused by: java.lang.NullPointerException: in com.entities.Sector in map in double null of double of map in field properties of com.entities.Sector
...
Caused by: java.lang.NullPointerException

The field mentioned is a HashMap<String, Double>, and some keys are mapped to null values.

Why isn't it possible to forward/serialize those elements with null values?
What do you do when your elements may contain nulls?

Regards,
Matt





--