Re: [DISCUSS] Towards Cascades Optimizer

2020-04-20 Thread Seliverstov Igor
Haisheng, Xiening, Ok, Now I see how it should work. Thanks for your replies. Regards, Igor > 20 апр. 2020 г., в 09:56, Seliverstov Igor написал(а): > > Haisheng, Xiening, > > Thanks for clarifying. > > In this proposal, we are not trying to split logical and physical

Re: [DISCUSS] Towards Cascades Optimizer

2020-04-20 Thread Seliverstov Igor
c) on join reordering (left-deep, right-deep, bushy), space pruning > won't help make long / infinite running query faster. > > > > b) No evidence shows current version of Calcite will return the most > promising plan in first planning iteration. Instead of praying for getting > good e

Re: [DISCUSS] Towards Cascades Optimizer

2020-04-19 Thread Seliverstov Igor
-p/319188 > > Regards, > Haisheng > > On 2020/04/19 11:31:27, Seliverstov Igor wrote: >> Haisheng, >> >> Ok, then such notification isn't needed >> >> But in this case we don't have any control over how long planning takes >> >> For some s

Re: [DISCUSS] Towards Cascades Optimizer

2020-04-19 Thread Seliverstov Igor
Haisheng Yuan : > Hi Igor, > > There will be no rule queue anymore. Y will be fully explored (logical > rules are matched and applied) before it can be implemented and optimized. > > Thanks, > Haisheng > > On 2020/04/19 10:11:45, Seliverstov Igor wrote: > > Hi Ha

Re: [DISCUSS] Towards Cascades Optimizer

2020-04-19 Thread Seliverstov Igor
Hi Haisheng, Great explanation, thanks. One thing I'd like to cover in advance is trait propagation process (I need it for Apache Ignite SQL engine implementation). For example: There are two nodes: Rel X and its child node Rel Y Both nodes are in Optimized state, and there is a Logical rule

Re: How to trace a column back to its original column

2020-02-19 Thread Seliverstov Igor
T1\n" > + "JOIN\n" > + " (SELECT (J.ID <http://j.id/> +100) AS NID,\n" > + " J.COMPANY\n" > + " FROM JOBS J) T2 ON T1.NID = T2.NID"; > > > Regards! > Aron T

Re: How to trace a column back to its original column

2020-02-19 Thread Seliverstov Igor
ay which method/field? > > Regards! > > Aron Tao > > > Seliverstov Igor 于2020年2月19日周三 下午2:31写道: > >> You can use their origins (says where a column came from). >> >> It's accessable from SqlValidatorImpl or jdbc result set >> >> ср, 19 февр

Re: How to trace a column back to its original column

2020-02-18 Thread Seliverstov Igor
You can use their origins (says where a column came from). It's accessable from SqlValidatorImpl or jdbc result set ср, 19 февр. 2020 г., 9:25 JiaTao Tao : > What I really need is to collect every part of the SQL, Which columns are > used as filters, which are used as projection(Columns on the

Re: [DISCUSS] Proposal to add API to force rules matching specific rels

2019-11-18 Thread Seliverstov Igor
Vladimir, Hope it may help you. Currently we applied the next way (just rough description): 1) We created an API to derive possible traits permutations on the basis of children traits (quite similar to one, described in «On Demand trait set request» topic) 2) added a general rule that

Re: Problem with converters and possibly rule matching

2019-11-01 Thread Seliverstov Igor
ladimir. > > > > > > "ProjectPhysicalRule [6] - transforms logical project to physical > > > project *ONLY* if there is an underlying physical input with REPLICATED > > or > > > SINGLETON distribution" > > > > > > The rule could be modi

Re: [DISCUSS] Proposal to add API to force rules matching specific rels

2019-10-31 Thread Seliverstov Igor
Not only "fireRule" method is needed, but the way to get all parents of a set, containing a subset, produced by the transformation. Or a way to fire rules without traits satisfaction check. чт, 31 окт. 2019 г., 10:56 Vladimir Ozerov : > Hi colleagues, > > I would like to discuss with the

Re: Problem with converters and possibly rule matching

2019-10-30 Thread Seliverstov Igor
gain - ideally we only need to re-trigger the rules for a specific > > node, no more than that. So API support like > > “VolcanoPlanner.forceRules(RelNode)” would be very convenient. > > > > What do you think? > > > > ср, 30 окт. 2019 г. в 17:56, Seliverstov Igor

Re: Problem with converters and possibly rule matching

2019-10-30 Thread Seliverstov Igor
d alternative. Basically, what would be enough > for > > me is to let the planner know somehow: "I created that rel, and I want > you > > to execute parent rules not only using its trait but also on this and > those > > traits." > > Is there any API in Ca

Re: Problem with converters and possibly rule matching

2019-10-30 Thread Seliverstov Igor
Vladimir, Probably it'll help you: Seems the cause of issue in RelSubset.getParentRels() The check used when the planner schedules newly matched rules after successful transformation (see VolcanoRuleCall.matchRecurse), it prevents the parent rule be applied once again (here your logical project

Re: [DISCUSS] Support Sql Hint for Calcite

2019-10-29 Thread Seliverstov Igor
Colleagues, Not only Hazelcast and Apache Flink are interested in SQL hints. Apache Ignite community is working on Calcite integration too, it’s important for us to have appropriate API at current development stage. This case we’ll be able to adapt our solution for SQL hints usage, probably

Re: Problem with converters and possibly rule matching

2019-10-29 Thread Seliverstov Igor
Vladimir, I guess Project rule doesn't have a child matcher. Put into it child "any" match rule and it will apply on each child node transformation. Regards, Igor вт, 29 окт. 2019 г., 7:07 Danny Chan : > Vladimir, all you need to do is to change the convention of the root node, > the volcano

Re: [DISCUSSION] Extension of Metadata Query

2019-10-17 Thread Seliverstov Igor
At least in our project (Apache Ignite) we use AbstractRelNode.metadata(). But it so because there is no way to put our metadata type into RelMetadataQuery without changes in Calcite. Regards, Igor чт, 17 окт. 2019 г., 19:16 Xiening Dai : > MetadataFactory is still useful. It provides a way to

Re: Ignite community is building Calcite-based prototype

2019-10-01 Thread Seliverstov Igor
Guys, The better link: https://cwiki.apache.org/confluence/display/IGNITE/IEP-37%3A+New+query+execution+engine Almost everything you may see by the link is the same as Drill guys already did, the