Hi Stamatis,

I have referred MaterializationTest as you suggested, I have created a
Schema similar to one present in the testcase and added Materialized View.
I have created HepPlanner with all the rules present in
AbstractMaterializedViewRule but when I am applying rules it's able to
select the Materialized View but not able to rewrite the query.

Can you please suggest me any clue to proceed?


- Regards
Kumar Vishal

On Tue, Dec 11, 2018 at 12:51 PM Kumar Vishal <[email protected]>
wrote:

> Hi Stamatis,
>
> Thanks for the info, I will check this and get back to you.
>
> -Regards
> Kumar Vishal
>
> On Sun, Dec 9, 2018 at 6:46 PM Stamatis Zampetakis <[email protected]>
> wrote:
>
>> Hi Kumar,
>>
>> Yes, it is possible.
>>
>> As long as you have your schema defined you can create a Planner (Volcano,
>> or Heuristic) with the appropriate rules for view based rewritting and
>> obtain a plan that is using the views. Then you can pass from a plan back
>> to sql using RelToSqlConverter.
>>
>> You might find interesting the discussion in [1]. You can also have a look
>> in the MaterializationTest which can serve as an entry point in order to
>> understand how the rewritting works.
>>
>> Best,
>> Stamatis
>>
>> [1]
>>
>> http://mail-archives.apache.org/mod_mbox/calcite-dev/201810.mbox/%3CAM0PR07MB5185C3F75488AA768815CF4FCCFD0%40AM0PR07MB5185.eurprd07.prod.outlook.com%3E
>>
>> Στις Παρ, 7 Δεκ 2018 στις 5:15 μ.μ., ο/η Kumar Vishal <
>> [email protected]> έγραψε:
>>
>> > Hi Dev,
>> >
>> > I am a new bee and analysing Calcite Materialized View. In my scenario I
>> > have multiple execution engines which have their own parser and
>> > optimizer(Some do not have integration with calcite). I want to register
>> > all the tables and Materialized Views to Calcite and handle commonly for
>> > all execution engines.
>> >
>> > i.e. I want to redirect User queries to calcite and get back the
>> rewritten
>> > sql (by selecting best fit Materialized View), so rewritten sql can be
>> > executed by execution engine.
>> >
>> > Is there anyway to get the rewritten sql based on Materialized View??
>> >
>> > -Regards
>> > Kumar Vishal
>> >
>>
>

Reply via email to