You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by JiaTao Tao <ta...@gmail.com> on 2019/12/30 07:03:59 UTC

Some question about lattices

Hi, community

I was investigating lattice recently and encountered some problems:
1. Lattice requires the estimated number of rows of cuboids (tiles) for
optimization. I've found the method: `TileSuggester.StatisticsProviderImpl
# getRowCount`, `LatticeStatisticProvider # cardinality`, but I found that
they were not used finally, can anyone tell where the code I should dig.

2. Are there any designs on how to automatically recommend the lattice (how
to make the initial recommendation, how to adjust the existing lattices
based on the query frequency / existing lattice), I can not find them
included in JIRA or doc(https://calcite.apache.org/docs/lattice.html)

Looking forward to hearing from you.

-- 

Regards!

Aron Tao

Re: Some question about lattices

Posted by Julian Hyde <jh...@apache.org>.
(Removing users@. This only needs to be on one list.)

Have you tried reading LatticeTest? You can see how APIs are used. 

I added QuerySqlStatisticProvider recently. Maybe QuerySqlStatisticProvider.SILENT_CACHING_INSTANCE meets your purposes.

Julian


> On Dec 29, 2019, at 11:03 PM, JiaTao Tao <ta...@gmail.com> wrote:
> 
> Hi, community
> 
> I was investigating lattice recently and encountered some problems:
> 1. Lattice requires the estimated number of rows of cuboids (tiles) for
> optimization. I've found the method: `TileSuggester.StatisticsProviderImpl
> # getRowCount`, `LatticeStatisticProvider # cardinality`, but I found that
> they were not used finally, can anyone tell where the code I should dig.
> 
> 2. Are there any designs on how to automatically recommend the lattice (how
> to make the initial recommendation, how to adjust the existing lattices
> based on the query frequency / existing lattice), I can not find them
> included in JIRA or doc(https://calcite.apache.org/docs/lattice.html)
> 
> Looking forward to hearing from you.
> 
> -- 
> 
> Regards!
> 
> Aron Tao