Re: Re: Join Pruning/Rewrites

2020-04-01 Thread Haisheng Yuan
-- 发件人:Stamatis Zampetakis 日 期:2020年03月28日 01:47:30 收件人: 主 题:Re: Join Pruning/Rewrites Hi Chris, I think your question is equivalent to the following: Does Calcite perform query minimization [1, 2] ? I don't remember seeing any part in Calcite that does this at the moment

Re: Join Pruning/Rewrites

2020-03-27 Thread Stamatis Zampetakis
Hi Chris, I think your question is equivalent to the following: Does Calcite perform query minimization [1, 2] ? I don't remember seeing any part in Calcite that does this at the moment but I may be wrong. In general the problem is NP-Hard, so no hope for treating it entirely for arbitrary

Re: Join Pruning/Rewrites

2020-03-27 Thread Chris Channing
A note I forgot to mention earlier is that I’m starting with a RelBuilder... On Fri, 27 Mar 2020 at 15:59, Chris Channing wrote: > Hey Folks, > > Is it currently possible to have Calcite optimize-away unnecessary joins? > The case I'm thinking of is where (hopefully the formatting holds up!): >

Re: Join Pruning/Rewrites

2020-03-27 Thread Julian Hyde
Can you give an example using real-ish tables eg customers, products, orders. And show the 2 sql statements that you allege to be equivalent. I have a feeling that it’s important which join keys you use. Julian Ps also please join the list so that you get replies. > On Mar 27, 2020, at