flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-2203) Add Support for Null-Values in RowSerializer
Date Sat, 13 Jun 2015 11:28:00 GMT

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

ASF GitHub Bot commented on FLINK-2203:
---------------------------------------

Github user aljoscha commented on a diff in the pull request:

    https://github.com/apache/flink/pull/831#discussion_r32369782
  
    --- Diff: flink-staging/flink-table/src/main/scala/org/apache/flink/api/table/typeinfo/RowSerializer.scala
---
    @@ -89,11 +99,16 @@ class RowSerializer(fieldSerializers: Array[TypeSerializer[Any]])
           throw new RuntimeException("Row arity of reuse and fields do not match.")
         }
     
    -    var i = 0
    -    while (i < len) {
    -      val field = reuse.productElement(i).asInstanceOf[AnyRef]
    -      reuse.setField(i, fieldSerializers(i).deserialize(field, source))
    -      i += 1
    +    (0 to len - 1).foreach {
    +      index =>
    +        val isNull: Boolean = source.readBoolean
    +        if (isNull) {
    +          reuse.setField(index, null)
    +        } else {
    +          val field = reuse.productElement(index).asInstanceOf[AnyRef]
    +          val serializer: TypeSerializer[Any] = fieldSerializers(index)
    +          reuse.setField(index, serializer.deserialize(field, source))
    +        }
    --- End diff --
    
    See above comment about while loop.


> Add Support for Null-Values in RowSerializer
> --------------------------------------------
>
>                 Key: FLINK-2203
>                 URL: https://issues.apache.org/jira/browse/FLINK-2203
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API
>            Reporter: Aljoscha Krettek
>            Assignee: Shiti Saxena
>            Priority: Minor
>              Labels: Starter
>
> This would be a start towards proper handling of null values. We would still need to
add support for null values in aggregations.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message