Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3849#discussion_r115339202
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/TableEnvironment.scala
---
@@ -677,6 +678,23 @@ abstract class TableEnvironment(val config:
TableConfig) {
case _ => throw new TableException(
"Field reference expression or alias on field expression
expected.")
}
+ case r: RowTypeInfo => {
+ // r.getFieldNames().map(name =>
+ // (r.getFieldIndex(name),name))
+ exprs.zipWithIndex flatMap {
+ case (UnresolvedFieldReference(name), idx) =>
+ Some((idx, name))
+ case (Alias(UnresolvedFieldReference(origName), name, _), _) =>
+ val idx = r.getFieldIndex(origName)
+ if (idx < 0) {
+ throw new TableException(s"$origName is not a field of type
$r")
+ }
+ Some((idx, name))
+ case _ => throw new TableException(
--- End diff --
we need to add the `TimeAttribute` case here as well:
```
case _: TimeAttribute =>
None
```
---
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.
---