Jackie-Jiang commented on code in PR #14233:
URL: https://github.com/apache/pinot/pull/14233#discussion_r1803610953


##########
pinot-query-planner/src/main/java/org/apache/pinot/calcite/rel/rules/PinotWindowExchangeNodeInsertRule.java:
##########
@@ -209,23 +244,37 @@ private void validateWindows(Window window) {
   }
 
   private void validateWindowAggCallsSupported(Window.Group windowGroup) {
-    for (int i = 0; i < windowGroup.aggCalls.size(); i++) {
-      Window.RexWinAggCall aggCall = windowGroup.aggCalls.get(i);
+    for (Window.RexWinAggCall aggCall : windowGroup.aggCalls) {
       SqlKind aggKind = aggCall.getKind();
       
Preconditions.checkState(SUPPORTED_WINDOW_FUNCTION_KIND.contains(aggKind),
           String.format("Unsupported Window function kind: %s. Only 
aggregation functions are supported!", aggKind));
     }
   }
 
   private void validateWindowFrames(Window.Group windowGroup) {
-    // Has ROWS only aggregation call kind (e.g. ROW_NUMBER)?
-    boolean isRowsOnlyTypeAggregateCall = 
isRowsOnlyAggregationCallType(windowGroup.aggCalls);
+    // Has rank based aggregation call kind (e.g. ROW_NUMBER, RANK, DENSE_RANK)
+    boolean hasRankBasedAgg = hasRankBasedAgg(windowGroup.aggCalls);
+
+    // FOLLOWING lower bound or PRECEDING upper bound is not allowed, and 
won't reach here

Review Comment:
   I tried it and iirc it is banned from parsing



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to