Github user wuchong commented on a diff in the pull request:
https://github.com/apache/flink/pull/4274#discussion_r126881444
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/expressions/stringExpressions.scala
---
@@ -277,3 +278,47 @@ case class Overlay(
position.toRexNode)
}
}
+
+/**
+ * Returns the string that results from concatenating the arguments.
+ * Returns NULL if any argument is NULL.
+ */
+case class Concat(strings: Seq[Expression]) extends Expression with
InputTypeSpec {
+
+ override private[flink] def children: Seq[Expression] = strings
+
+ override private[flink] def resultType: TypeInformation[_] =
BasicTypeInfo.STRING_TYPE_INFO
+
+ override private[flink] def expectedTypes: Seq[TypeInformation[_]] =
STRING_TYPE_INFO :: Nil
--- End diff --
The `expectedTypes` should be the same size as children with
`STRING_TYPE_INFO`.
All the tests passed, because there is a bug in
`InputTypeSpec#validateInput` which do not check the size of `expectedTypes`
and `children`. It would be great if we can fix it in this PR.
---
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.
---