You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by wuchong <gi...@git.apache.org> on 2016/07/04 02:21:40 UTC

[GitHub] flink pull request #2078: [FLINK-2985] Allow different field names for union...

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

    https://github.com/apache/flink/pull/2078#discussion_r69402729
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/typeutils/RowTypeInfo.scala ---
    @@ -25,38 +25,25 @@ import org.apache.flink.api.scala.typeutils.CaseClassTypeInfo
     
     import scala.collection.mutable.ArrayBuffer
     import org.apache.flink.api.common.typeutils.TypeSerializer
    -import org.apache.flink.api.table.{Row, TableException}
    +import org.apache.flink.api.table.Row
     
     /**
      * TypeInformation for [[Row]].
      */
    -class RowTypeInfo(fieldTypes: Seq[TypeInformation[_]], fieldNames: Seq[String])
    +class RowTypeInfo(fieldTypes: Seq[TypeInformation[_]])
       extends CaseClassTypeInfo[Row](
         classOf[Row],
         Array(),
         fieldTypes,
    -    fieldNames)
    +    Nil)
    --- End diff --
    
    I would like to replace `Nil` with `for (i <- fieldTypes.indices) yield "f" + i`, so that we can keep fieldNames as `val`.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---