Re: Difficulties with implementing a table for a custom convention

2019-05-07 Thread Stamatis Zampetakis
The plan seems reasonable to me so as you said there seems to be a problem with the Interpreter. Overriding childrenAccept seems like a good workaround but I think it would be nice to fix the Interpreter. Can you please log a JIRA issue for this? As a general remark, I don't use Bindable conventio

Re: Difficulties with implementing a table for a custom convention

2019-05-06 Thread Muhammad Gelbana
Thank you all for your time but unfortunately I'm unable to overcome this challenge so far. Allow me to explain more. *This is how I'm using calcite* Planner planner = Frameworks.getPlanner(frameworkConfig); // frameworkConfig is irrelevant I suppose SqlNode parsed = planner.parse("SELECT Tenant F

Re: Difficulties with implementing a table for a custom convention

2019-05-05 Thread Stamatis Zampetakis
Hi Muhammad, I'm not sure why you need to implement InterpretableRel interface. I'm probably missing some details. I suppose you are using Calcite through the JDBC interface thus I guess you are relying on CalcitePrepareImpl. If that's the case then using TranslatableTable interface seems like a

Re: Difficulties with implementing a table for a custom convention

2019-05-04 Thread Yuzhao Chen
You can set up the target traits to include the convention you want when invoke the Program#run method [1], with the converters as rules of the program. [1]  https://github.com/apache/calcite/blob/9ece70f5dcdb00dbc6712496c51f52c05178d4aa/core/src/main/java/org/apache/calcite/tools/Program.java#L3

Difficulties with implementing a table for a custom convention

2019-05-04 Thread Muhammad Gelbana
I implemented a new convention but I'm facing difficulties with implementing tables for that convention. Since I need to apply my convention rules and converters, I assume I must implement TranslatableTable so I can override the RelNode produced by the toRel method and provide the rules I need thr