danny0405 commented on a change in pull request #2092:
URL: https://github.com/apache/calcite/pull/2092#discussion_r464764558



##########
File path: core/src/main/java/org/apache/calcite/sql/SqlUtil.java
##########
@@ -1189,4 +1189,19 @@ private void visitChild(SqlNode node) {
       return check(type);
     }
   }
+
+  /**
+   * Whether the selectItem is a table function node in the select.
+   * eg. "select table_func(1) as (f0,f1)"
+   *
+   * @param selectItem select item
+   * @return true if this selectItem is a table function call
+   */
+  public static boolean isTableFunctionInSelect(SqlNode selectItem) {
+    if (selectItem.getKind() == SqlKind.AS) {
+      SqlBasicCall call = (SqlBasicCall) selectItem;

Review comment:
       At least, we should check the function is a `SqlTableFunction`.




----------------------------------------------------------------
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]


Reply via email to