Hi, Shubham Kumar ~

> However, I wanted the optimized rewrite SQL query if possible, not just the
> plan. So far, I tried to use the rel2sql api but when I print
> RelNode.toString(), it gives me a plan which involves scanning the raw
> tables and hence the SQL generated by rel2sql is not the one which utilized
> the materialized view. Any pointers to get the rewrite query.

Did you try the RelNode.toString() after the volcano planner promotion, it is 
not expected to involve scanning the raw tables.

Best,
Danny Chan
在 2019年9月11日 +0800 PM9:42,dev@calcite.apache.org,写道:
>
> However, I wanted the optimized rewrite SQL query if possible, not just the
> plan. So far, I tried to use the rel2sql api but when I print
> RelNode.toString(), it gives me a plan which involves scanning the raw
> tables and hence the SQL generated by rel2sql is not the one which utilized
> the materialized view. Any pointers to get the rewrite query.

Reply via email to