[
https://issues.apache.org/jira/browse/FLINK-3140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15068229#comment-15068229
]
ASF GitHub Bot commented on FLINK-3140:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/1465#discussion_r48261874
--- Diff:
flink-staging/flink-table/src/main/scala/org/apache/flink/api/table/typeinfo/RowSerializer.scala
---
@@ -40,15 +46,32 @@ class RowSerializer(val fieldSerializers:
Array[TypeSerializer[Any]])
override def copy(from: Row, reuse: Row): Row = {
val len = fieldSerializers.length
- if (from.productArity != len) {
+ // cannot reuse, do a non-reuse copy
+ if (reuse == null) {
+ return copy(from)
+ }
+
+ if (from.productArity != len || reuse.productArity != len) {
throw new RuntimeException("Row arity of reuse and from do not
match.")
--- End diff --
Error message should be: "Row arity of reuse or from is incompatible with
this RowSerializer".
> NULL value data layout in Row Serializer/Comparator
> ---------------------------------------------------
>
> Key: FLINK-3140
> URL: https://issues.apache.org/jira/browse/FLINK-3140
> Project: Flink
> Issue Type: Sub-task
> Components: Table API
> Reporter: Chengxiang Li
> Assignee: Timo Walther
>
> To store/materialize NULL value in Row objects, we should need new Row
> Serializer/Comparator which is aware of NULL value fields.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)