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".


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to