[
https://issues.apache.org/jira/browse/FLINK-2985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15360749#comment-15360749
]
ASF GitHub Bot commented on FLINK-2985:
---------------------------------------
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`.
> Allow different field names for unionAll() in Table API
> -------------------------------------------------------
>
> Key: FLINK-2985
> URL: https://issues.apache.org/jira/browse/FLINK-2985
> Project: Flink
> Issue Type: Improvement
> Components: Table API & SQL
> Reporter: Timo Walther
> Priority: Minor
>
> The recently merged `unionAll` operator checks if the field names of the left
> and right side are equal. Actually, this is not necessary. The union operator
> in SQL checks only the types and uses the names of left side.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)