You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Márton Balassi (JIRA)" <ji...@apache.org> on 2014/07/16 20:36:04 UTC

[jira] [Comment Edited] (FLINK-629) Add support for null values to the java api

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

Márton Balassi edited comment on FLINK-629 at 7/16/14 6:34 PM:
---------------------------------------------------------------

As a result of working on this issue we've also noticed that a number of the boxed primitives do not handle null values themselves (or for any user defined type that does not handle this), and consequently the user would receive the following exception from the serializer which is misleading:

Exception in thread "main" org.apache.flink.runtime.client.JobExecutionException: java.lang.NullPointerException
	at org.apache.flink.api.common.typeutils.base.IntSerializer.serialize(IntSerializer.java:64)
	at org.apache.flink.api.common.typeutils.base.IntSerializer.serialize(IntSerializer.java:1)
	at org.apache.flink.api.java.typeutils.runtime.TupleSerializer.serialize(TupleSerializer.java:108)

As a part of this JIRA we'd also add a specific exception for that use case.


was (Author: mbalassi):
As a result of working on this issue we've also noticed that a number of the boxed primitives do not handle null values themselves (or for any user defined type that does not handle this) the user would receive the following exception from the serializer which is misleading:

Exception in thread "main" org.apache.flink.runtime.client.JobExecutionException: java.lang.NullPointerException
	at org.apache.flink.api.common.typeutils.base.IntSerializer.serialize(IntSerializer.java:64)
	at org.apache.flink.api.common.typeutils.base.IntSerializer.serialize(IntSerializer.java:1)
	at org.apache.flink.api.java.typeutils.runtime.TupleSerializer.serialize(TupleSerializer.java:108)

As a part of this JIRA we'd also add a specific exception for that use case.

> Add support for null values to the java api
> -------------------------------------------
>
>                 Key: FLINK-629
>                 URL: https://issues.apache.org/jira/browse/FLINK-629
>             Project: Flink
>          Issue Type: Improvement
>          Components: Java API
>            Reporter: Stephan Ewen
>            Assignee: Gyula Fora
>            Priority: Critical
>              Labels: github-import
>             Fix For: pre-apache
>
>
> Currently, many runtime operations fail when encountering a null value. Tuple serialization should allow null fields.
> I suggest to add a method to the tuples called `getFieldNotNull()` which throws a meaningful exception when the accessed field is null. That way, we simplify the logic of operators that should not dead with null fields, like key grouping or aggregations.
> Even though SQL allows grouping and aggregating of null values, I suggest to exclude this from the java api, because the SQL semantics of aggregating null fields are messy.
> ---------------- Imported from GitHub ----------------
> Url: https://github.com/stratosphere/stratosphere/issues/629
> Created by: [StephanEwen|https://github.com/StephanEwen]
> Labels: enhancement, java api, 
> Milestone: Release 0.5.1
> Created at: Wed Mar 26 00:27:49 CET 2014
> State: open



--
This message was sent by Atlassian JIRA
(v6.2#6252)