suibianwanwank commented on code in PR #3949:
URL: https://github.com/apache/calcite/pull/3949#discussion_r1752259433
##########
core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java:
##########
@@ -2006,6 +2010,31 @@ private boolean hasSortByOrdinal(@UnknownInitialization
Result this,
return false;
}
+ private boolean containsOver(@UnknownInitialization Result this,
Review Comment:
In calcite _SqlUtil_ , we can do it like this
```
/**
* Returns whether a given node contains an over function.
*
* @param node AST tree
*/
public static boolean containsOver(SqlNode node) {
final Predicate<SqlCall> callPredicate = call ->
call.getKind() == SqlKind.OVER;
return containsCall(node, callPredicate);
}
```
But I can't be sure if the node is necessarily a SqlSelect, it might be a
SqlInsert? If so, I still have to visit all the node's inputs before finding a
SqlSelect.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]