somandal commented on code in PR #10228:
URL: https://github.com/apache/pinot/pull/10228#discussion_r1099621725


##########
pinot-query-planner/src/test/resources/queries/OrderBy.json:
##########
@@ -0,0 +1,58 @@
+{
+  "order_by_planning_tests": {

Review Comment:
   I was trying to see how alias works with WindowFunctions and looks like it 
doesn't work! The plan looks no different than if the alias is not present. 
Will need to look into this. I will add a few alias tests for the other types 
where it does work.
   
   In the `CalcRelSplitter::execute()` there is a block of code which is 
overwriting the aliases by setting the rel to the input:
   
   ```
         // Sometimes a level's program merely projects its inputs. We don't
         // want these. They cause an explosion in the search space.
         if (rel instanceof LogicalCalc
             && ((LogicalCalc) rel).getProgram().isTrivial()) {
           rel = rel.getInput(0);
         }
   ```
   
   For now is it alright if I add a note that we need to look into this for 
window functions?



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