dawidwys commented on a change in pull request #8087: [FLINK-12029][table] Add
column operations for TableApi
URL: https://github.com/apache/flink/pull/8087#discussion_r274792694
##########
File path:
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/tableImpl.scala
##########
@@ -564,26 +575,47 @@ class WindowGroupedTableImpl(
fields)
}
+ private def expandColumnsInGroupWindow(window: GroupWindow): GroupWindow = {
Review comment:
But the code in `extractFieldReference` would be super simple. I haven't
checked it, but this should work:
```
@Override
public List<Expression> visitCall(CallExpression call) {
FunctionDefinition functionDefinition = call.getFunctionDefinition();
if (WINDOW_PROPERTIES.contains(functionDefinition)) {
return Collections.emptyList();
} else if (COLUMN_OPERATIONS.contains(functionDefinition)) {
return Collections.singletonList(call);
} else {
return call.getChildren()
.stream()
.flatMap(c -> c.accept(this).stream())
.distinct()
.collect(Collectors.toList());
}
}
```
We do the same for `UnresolvedFieldReference('*')`, which in fact can be
expressed with columnOperation as well.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services