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


##########
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:
   For example, if we do this query in ROW_NUMBER()
   
   SELECT colName, ROW_NUMBER() OVER() FROM FOO
   
   It is probably easy to reason about the output since we get column values 
with corresponding number assigned.
   
   Now in COUNT(*), it will be like column values and the overall count of the 
rows besides each column value which probably does not look like a meaningful 
result to reason about. 
   
   SELECT colName, COUNT(*) OVER() FROM FOO
   
   But that is just an opinion. Syntactically may be it is fine!!
   
   



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