Vladimir, Can you please review https://github.com/julianhyde/incubator-calcite/tree/calcite-445. I have changed the rules that transform scans of FilterableTable and ProjectableFilterableTable into something that can be executed, shifting more of the complex runtime logic (e.g. negotiating which filters and projects to push down) into BindableTableScan.
This change lays the foundations for streaming queries, such as being able to query both the current contents of a table and future deltas to it (i.e. its stream). You can see that work on https://github.com/julianhyde/incubator-calcite/tree/chi. I couldn’t manage to get RelOptTable.getExpression(Class) to generate a different expression for the two forms of the same table, and switching from EnumerableTableScan to BindableTableScan made life much easier. I also added “create” methods for quite a few more RelNode sub-classes. I think this will become the recommended way of creating each kind of RelNode. Julian
