Dear all,

For a project I want to retrieve the Calcite RelNodes during the execution of 
the queries (perhaps even before query optimisation if possible) and perform 
some analysis on those RelNodes. However, I am a bit stuck with the best way to 
approach this. Has something similar already been done which I can leverage?

Looking at the Hive Hooks, there exists a HookContext which contains the query 
state as a property. From there you can initialise a CalCitePlanner and call 
the genLogicalPlan function using an ASTNode. Would the original ASTNode of the 
query be stored somewhere? Is this also the preferred approach to get access to 
these calcite logical plans?


With kind regards,

Mark

Reply via email to