siddharthteotia commented on code in PR #10635:
URL: https://github.com/apache/pinot/pull/10635#discussion_r1174691817


##########
pinot-query-planner/src/test/resources/queries/WindowFunctionPlans.json:
##########
@@ -14,6 +14,33 @@
           "\n"
         ]
       },
+      {
+        "description": "single empty OVER() count(*) only",
+        "sql": "EXPLAIN PLAN FOR SELECT COUNT(*) OVER() FROM a",
+        "output": [
+          "Execution Plan",
+          "\nLogicalProject(w0$o0=[$1])",
+          "\n  LogicalWindow(window#0=[window(aggs [COUNT()])])",
+          "\n    LogicalExchange(distribution=[hash])",
+          "\n      LogicalProject(winLiteral=[0])",
+          "\n        LogicalTableScan(table=[[a]])",
+          "\n"
+        ]
+      },
+      {
+        "description": "single empty OVER() literal, count(*) only",
+        "sql": "EXPLAIN PLAN FOR SELECT 42, COUNT(*) OVER() FROM a",

Review Comment:
   Is the problem being solved in this PR not applicable to following kind of 
query ?
   
   ```
   SELECT columnName, count(*) OVER()
   FROM FOO
   ```
   
   This shouldn't even be a valid query imo (MySQL it doesn't work). Is that 
true for Postgres too ?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to