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 through the RelNode.register(RelOptPlanner planner) call back (Is there another way ?) At the same time, I need for my table's RelNode to implement my convention's interface. After implementing TranslatableTable and my convention's interface, I discovered that my table's RelNode have to either implement an interpreter node or the InterpretableRel interface. But this led to what seems to me as that my table scan is executed twice. I tried many things, such as having my table extend TableScan, AbstractEnumerable2 QueryableTable and other interfaces/class that either didn't give me what I want or failed with strange exceptions. What I need is to implement my table scan following the same convention I'm writing. So what is the correct way to do this ? The MongoDB adapter way is to implement the TranslatableTable and the QueryableTable interfaces, but that's confusing me. I mean, it's already implementing its own new convention interface, why would it need to implement another one to implement its table scans ? I thought while executing the final plan, the first calcite identified node (enumerable or bindable, enumerable as in MongoDB adapter's example), the interpreter would execute that node, which will internally execute all its input nodes including the table scan, correct ? Thanks, Gelbana
