jinxing64 commented on a change in pull request #1138: [CALCITE-1581] UDTF like
in hive
URL: https://github.com/apache/calcite/pull/1138#discussion_r341087241
##########
File path: core/src/main/java/org/apache/calcite/sql/SqlUtil.java
##########
@@ -1080,6 +1080,21 @@ 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) {
Review comment:
Actually I'm a little bit confused when we talk about `table function`, I
think this PR really means UDTF. But it always comes to my mind the table
function defined in
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/schema/TableFunction.java
, i.e. function that returns a table and used like `select * from
table(Maze(5, 3, 1))`
IIUC they are different things. If I'm right how about we use term of `UDTF`
in this PR ?
----------------------------------------------------------------
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