Just providing an immutable link for posterity. (You can get one by pressing y on most GitHub pages.)
https://github.com/apache/drill/blob/56c8f0a7f97c3796ba90976fdbb6d90c5f2229a5/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/DefaultSqlHandler.java#L405 -- Michael Mior mm...@apache.org Le lun. 5 nov. 2018 à 03:02, Ted Xu <frank...@gmail.com> a écrit : > Hi Tian, > > To inject statistics, you need to implement your own RelMetadataProvider > and register it into your runtime environment. > > I'm not able to find a valid example in Calcite, but there is a good > example you can find in Drill > > https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/DefaultSqlHandler.java#L405 > . > > > On Mon, Nov 5, 2018 at 11:54 AM Tian Ye <y...@pku.edu.cn> wrote: > > > Hi, > > > > I'm working on comparing the query plan generated by Calcite with that > > from a DBMS I'm developing. > > > > In particular, I can generate some TPC-H data and a SQL query, and I want > > to let Calcite generate as good query plan as it can. So far, I haven't > > passed any statistics to Calcite, so the query plan it generates is just > a > > baseline. > > > > Now I wonder how I could pass statistics to Calcite. What I don't > > understand is that since Calcite does not load the data until query plan > is > > actually executed, how could I pass statistics to it? > > I fail to find any document talking about how to do that in detail. The > > last paragraphs of http://calcite.apache.org/docs/adapter.html do > > mention it but are not so clear. > > > > > > > > > > Would you please help me? > > > > Thanks a lot. > > > > > > > > > > -------- > > Tian Ye > > y...@pku.edu.cn >