rohangarg opened a new pull request, #14232:
URL: https://github.com/apache/druid/pull/14232

   This patch starts the process of decoupling logical planning and native 
query generation in SQL planning. Currently, the DAG optimization and the 
native query generation are both done simultaneously in the planner via calcite 
optimization and conversion rules.
   That coupling leads to difficulty in obtaining a logical DAG from the 
planner if needed, as well as the debugging and logging for erroneous queries 
also becomes very difficult to do or comprehend.
   The patch decouples the two things by allowing logical planning to happen 
via the calcite planner and let it generate a DAG which contains `RelNode` 
nodes as per a defined logical Druid convention. Post that, the DAG is 
converted to a native query through a visitor over the produced `RelNode` tree.
   The patch is put behind a feature flag `plannerStrategy` which can have two 
modes `COUPLED` and `DECOUPLED`. Currently, the default mode is `COUPLED` which 
means that the mode of planning currently is same as before. 
   The new planning mode is enabled via setting the mode as `DECOUPLED`.
   Further, the feature is WIP in the sense that some operators (like 
join/window/union) haven't been rewritten to allow planning through the new 
mechanism. Also, in the currently converted operators 
(scan/filter/project/sort/aggregate), there are a few test failures in the 
corner cases. Both of those things are planned to be fixed in future patches 
for the feature.
   


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