chunweilei commented on a change in pull request #1565: [CALCITE-3481] Support
convert TableFunctionScan to SqlNode
URL: https://github.com/apache/calcite/pull/1565#discussion_r344658736
##########
File path:
core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java
##########
@@ -828,6 +830,27 @@ public Result visit(Uncollect e) {
return result(asNode, ImmutableList.of(Clause.FROM), e, null);
}
+ public Result visit(TableFunctionScan e) {
+ final List<SqlNode> inputSqlNodes = new ArrayList<>();
+ for (int i = 0; i < e.getInputs().size(); i++) {
+ Result child = visitChild(i, e.getInput(i));
+ inputSqlNodes.add(child.asStatement());
Review comment:
You can get size of inputs of `TableFunctionScan` in advance, which can help
initialize the array list. Besides, it is better to use `for (int i = 0; i <
size; i++) ` instead of `for (int i = 0; i < e.getInputs().size(); i++)`.
----------------------------------------------------------------
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