amaliujia commented on a change in pull request #1587: [CALCITE-3272] Support
TUMBLE as Table Valued Function including an enumerable implementation,
stream.iq and DESCRIPTOR
URL: https://github.com/apache/calcite/pull/1587#discussion_r358063858
##########
File path:
core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableTableFunctionScan.java
##########
@@ -61,28 +78,32 @@ public EnumerableTableFunctionScan(RelOptCluster cluster,
}
public Result implement(EnumerableRelImplementor implementor, Prefer pref) {
- BlockBuilder bb = new BlockBuilder();
- // Non-array user-specified types are not supported yet
- final JavaRowFormat format;
- if (getElementType() == null) {
- format = JavaRowFormat.ARRAY;
- } else if (rowType.getFieldCount() == 1 && isQueryable()) {
- format = JavaRowFormat.SCALAR;
- } else if (getElementType() instanceof Class
- && Object[].class.isAssignableFrom((Class) getElementType())) {
- format = JavaRowFormat.ARRAY;
+ if (getCall().getKind() == SqlKind.TUMBLE) {
+ return tableValuedFunctionWindowingImplement(implementor, pref);
} else {
- format = JavaRowFormat.CUSTOM;
+ BlockBuilder bb = new BlockBuilder();
Review comment:
done
----------------------------------------------------------------
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