Re: Query planner flow and optimizer rules

2016-04-05 Thread Lee Butts
Hi Jacques, thanks for your quick reply - the goal of all this is to get some information from the where clause e.g. "t between 2016-01-01 and 2016-01-20" and make it available to the record reader that I am returning from EasyFormatPlugin.getRecordReader() which is only provided a FragmentContext

Re: Query planner flow and optimizer rules

2016-04-04 Thread Jacques Nadeau
On your strategy, generally, rules should be independent and rel nodes should be immutable. I don't fully understand what you are trying to do but your description seems like a bit of an anti-pattern. You'll also need to figure out what phase or phases should include your rules. On Apr 4, 2016 9:5

Re: Query planner flow and optimizer rules

2016-04-04 Thread Jacques Nadeau
You should enable Calcite plan debugging. The instructions can be found by looking at the historical version of the Calcite howto before the logging framework changed in 1.5. [1] tracing section. Couple possibilities are you are not calculating distinct digests for your scan or your costs aren't r

Query planner flow and optimizer rules

2016-04-04 Thread Lee Butts
Hi, I'm trying to add some custom optimizer rules for my storage format plugin and am having trouble understanding the process the query planner goes through when building logical and physical query plans. What I'd like to do is the following: 1) Add a rule which matches all filters and collects