walterddr commented on issue #12304:
URL: https://github.com/apache/pinot/issues/12304#issuecomment-1922815466

   Hi @dttung2905 thank you for the interest. 
   
   yes this is indeed a relatively good beginner task to get to know the pinot 
codebase.
   
   a bit of a explanation: the code you linked are for the v1 engine not for 
the multi-stage engine. (e.g. the function you linked is to convert `SqlNode` 
into `PinotQuery`. In order to achieve similar effect in the multi-stage engine:
   
   1. look for where both engine utilize the same logic to parse the SQL string 
into `SqlNodeAndOptions`
   
https://github.com/apache/pinot/blob/0a4398634be81cdbbe891b3da249134ef98743e7/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java#L105-L115
   
   2. look for where the query is being converted into an execution plan 
(`compileQuery` method)
   
https://github.com/apache/pinot/blob/0a4398634be81cdbbe891b3da249134ef98743e7/pinot-query-planner/src/main/java/org/apache/pinot/query/QueryEnvironment.java#L144-L148
   
   3. you can see that the compilation runs several steps including validation, 
relational planning and optimizer. any one of these steps can be used to check 
the fetch limit 
   
   If this is too complicated, please feel free to check in again 
   (i added the beginner task tag but decided to remove it as it is not as 
straightforward as I original thought of)
   


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