Re: Row Count Estimation for Volcano Optimizer

2019-05-21 Thread Kai Jiang
Hi Alireza, Like Stamatis said, implement computeSelfCost() method or implement getStatistic in BeamCalciteTable. Just fyi, there are some discussion in https://github.com/apache/beam/pull/6656 Best, Kai On Tue, May 21, 2019 at 3:27 PM Alireza Samadian wrote: > Thank you. That works. > > Best,

Re: Row Count Estimation for Volcano Optimizer

2019-05-21 Thread Alireza Samadian
Thank you. That works. Best, Alireza On Tue, May 21, 2019 at 3:06 PM Stamatis Zampetakis wrote: > Hi Alireza, > > I suppose you mainly need count estimates for base tables. > One way to provide this information is by implementing the Table interface > [1] and providing an appropriate implementa

Re: Row Count Estimation for Volcano Optimizer

2019-05-21 Thread Stamatis Zampetakis
Hi Alireza, I suppose you mainly need count estimates for base tables. One way to provide this information is by implementing the Table interface [1] and providing an appropriate implementation for the getStatistic() method. Another way would be to extend TableScan [2] operator and provide another

Row Count Estimation for Volcano Optimizer

2019-05-20 Thread Alireza Samadian
Hi, I'm working on Beam SQL and we are using Apache Calcite for our query parsing and optimization. We are trying to use row count estimates for Volcano Optimizer. Currently, Calcite returns row count estimate of 100 for every table. It seems the cost estimate comes from bunch of handlers in org.a