Re: [ANNOUNCE] Danny Chan joins Calcite PMC

2019-11-01 Thread Muhammad Gelbana
Congratulations! Thanks, Gelbana On Fri, Nov 1, 2019 at 9:07 AM Stamatis Zampetakis wrote: > Congratulations Danny! > > You are doing an amazing job. The project and the community is becoming > better every day and your help is much appreciated. > > Keep up the momentum! > > Best, > Stamatis

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

2019-11-01 Thread Xiening Dai
I think the Convention as a trait is something special to Calcite (not a Volcano concept). Calcite uses it for federation queries over heterogeneous data source. Look at Calcite paper[1] 4 Traits. It explains the idea quite well. [1] https://arxiv.org/pdf/1802.10233.pdf > On Nov 1, 2019, at

Re: [DISCUSS] On-demand traitset request

2019-11-01 Thread Xiening Dai
Yes, my major concern is the expanding of search space. If we request the permutation of (a, b, c) then we increase the search space 6 times. In a lot of cases where query is complex, we might not be able to finish the search at all. I think there’s gonna be some heuristics built in to guide

Re: Problem with converters and possibly rule matching

2019-11-01 Thread Vladimir Ozerov
Hi Stamatis, Thank you for your reply. I also thought that we may set the distribution trait during logical planning because it is known in advance. And the example I gave will work! :-) But unfortunately, it will work only because the tree is very simple, and the Project is adjacent to the Scan.

Re: Problem with converters and possibly rule matching

2019-11-01 Thread Seliverstov Igor
Stamatis, Small comment from me, for distributed systems is more efficient if SINGLETON distribution appears only on root node, in other words as late as possible, it allows to filter or cut rows (project) on source nodes which significantly reduces network costs. To do that (In case we use

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

2019-11-01 Thread Stamatis Zampetakis
@Vladimir: Given that you want to make the optimizer to work in bottom-up fashion maybe it suffices to inverse the comparator in the RuleQueue [1]. For sure there are rules which would not be compatible with this change but maybe for your project it makes sense. I never tried it my self but I

How to enable cache schema through JDBC properties

2019-11-01 Thread zhaojun
Hi, all I have found a cache property in JsonSchema, default value was true,calcite version was 1.20.0 But when I create a calcite connection through DriverManager.getConnection, cache property value was null after Jackson deserialization. My code is like this ``` Properties properties = new

Re: Problem with converters and possibly rule matching

2019-11-01 Thread Stamatis Zampetakis
The discussion is interesting thanks for the nice examples. I am replying in this thread since it has all the examples and the history of the conversation. *Part I: Distribution physical or logical property* The Volcano paper writes the following regarding properties: "Logical properties can be

[jira] [Created] (CALCITE-3469) Fix typo in SubstitutionVisitor#rowTypesAreEquivalent

2019-11-01 Thread daimin (Jira)
daimin created CALCITE-3469: --- Summary: Fix typo in SubstitutionVisitor#rowTypesAreEquivalent Key: CALCITE-3469 URL: https://issues.apache.org/jira/browse/CALCITE-3469 Project: Calcite Issue Type:

Re: [ANNOUNCE] Danny Chan joins Calcite PMC

2019-11-01 Thread Stamatis Zampetakis
Congratulations Danny! You are doing an amazing job. The project and the community is becoming better every day and your help is much appreciated. Keep up the momentum! Best, Stamatis On Thu, Oct 31, 2019 at 4:41 AM Kurt Young wrote: > Congratulations Danny! > > Best, > Kurt > > > On Thu,

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

2019-11-01 Thread Jinfeng Ni
I think "pull-up traits" is necessary, since the physical traits are propagated upwards. However, I'm not fully convinced "On Demand Trait" is the best solution, as I feel it may restrict the choices the planner may consider. Maybe after the proposed design doc is ready, we may look into the

Re: [DISCUSS] On-demand traitset request

2019-11-01 Thread Jinfeng Ni
Hi Xiening, "Let say if R and S doesn’t have sorting properties at all. In your case, we would end up adding enforcers for LHS and RHS to get collation (a, b, c). Then we would need another enforcer to get collation (b, c). This is a sub optimal plan as we could have use (b, c, a) for join." In