Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2319#discussion_r88699109
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/plan/RexNodeTranslator.scala
---
@@ -74,15 +75,52 @@ object RexNodeTranslator {
/**
* Parses all input expressions to [[UnresolvedAlias]].
- * And expands star to parent's full project list.
+ * And expands star to parent's full project list and flattens
composite types.
*/
- def expandProjectList(exprs: Seq[Expression], parent: LogicalNode):
Seq[NamedExpression] = {
+ def expandProjectList(
+ exprs: Seq[Expression],
+ parent: LogicalNode,
+ tableEnv: TableEnvironment)
+ : Seq[NamedExpression] = {
+
val projectList = new ListBuffer[NamedExpression]
exprs.foreach {
+
case n: UnresolvedFieldReference if n.name == "*" =>
projectList ++= parent.output.map(UnresolvedAlias(_))
+
+ // flattening can only applied on field references
+ case Flattening(composite) if
--- End diff --
Add a case for `Flattening(_)` that catches Flattenings on non-field
expressions and throw a `ValidationException`?
---
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.
---