[jira] [Created] (CALCITE-3718) Support Intersect and Minus in Bindables

2020-01-08 Thread xzh_dz (Jira)
xzh_dz created CALCITE-3718: --- Summary: Support Intersect and Minus in Bindables Key: CALCITE-3718 URL: https://issues.apache.org/jira/browse/CALCITE-3718 Project: Calcite Issue Type: Wish

Re: Cannot parse query that contains colons for casting in postgres sql

2020-01-08 Thread XING JIN
Hi, Rick ~ Babel parser supports casting by double colon [1] [1] https://issues.apache.org/jira/browse/CALCITE-2843 -Jin Rick Liao 于2020年1月9日周四 上午6:05写道: > Hello all, > > I'm trying to parse a postgres sql query that contains :: for casting. The > parser fails when it reaches the colon. I'm

Re: [DISCUSS] propagateCostImprovements vs incremental bestCost maintenance vs metadata

2020-01-08 Thread Xiening Dai
That’s why I say it’s hard to solve under current framework design. The example query you provide can be, and should be, optimized during logical transformation phase. At that moment, there shouldn’t be any cost calculation since all we are doing is to explore equivalences. Once the

Cannot parse query that contains colons for casting in postgres sql

2020-01-08 Thread Rick Liao
Hello all, I'm trying to parse a postgres sql query that contains :: for casting. The parser fails when it reaches the colon. I'm using version 1.21.0. This is what I'm running (with a simple query to showcase the error): SqlParser.Config parserConfig =

Re: [DISCUSS] propagateCostImprovements vs incremental bestCost maintenance vs metadata

2020-01-08 Thread Vladimir Sitnikov
>In theory, the cardinality and uniqueness of a RelSubset should never changed per definition of equivalent set I agree. It is like in theory there is no difference between theory and practice :) What if we have select empid from (select empid from emps where empid>0) where empid<0 ? The

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

2020-01-08 Thread Xiening Dai
I see. But that’s unrelated to join ordering. > On Jan 7, 2020, at 11:29 PM, Danny Chan wrote: > > Internally we have a multi-inputs merge join, for each input there maybe a > collation permutations. > > Best, > Danny Chan > 在 2020年1月8日 +0800 AM1:20,Xiening Dai ,写道: >> Danny, I am not sure

Re: [DISCUSS] propagateCostImprovements vs incremental bestCost maintenance vs metadata

2020-01-08 Thread Xiening Dai
This is similar to CALCITE-2166 where a RelNode’s best cost could increase after its input RelSubset cardinality is changed. Unfortunately there’s no easy way to fix this with current framework design. In theory, the cardinality and uniqueness of a RelSubset should never changed per definition

[DISCUSS] propagateCostImprovements vs incremental bestCost maintenance vs metadata

2020-01-08 Thread Vladimir Sitnikov
Hi, As far as I understand, the incremental best/bestCost maintenance at RelSubset level does not really work. That issue is triggered a lot in MaterializationTests due to https://issues.apache.org/jira/browse/CALCITE-3682 (MaterializationService#defineMaterialization loses information on unique

[discuss] Implement Presto adapter

2020-01-08 Thread Forward Xu
Hi everybody, I'd like to kick off a discussion on Implement Presto adapter in calcite. We know that presto is also a powerful SQL query tool, which is widely used with the olap of big data. So I want to add an adapter for presto to calite. Would love to hear your thoughts. Best, Forward

[jira] [Created] (CALCITE-3717) Query fails with "division by zero" exception

2020-01-08 Thread Hank Miller (Jira)
Hank Miller created CALCITE-3717: Summary: Query fails with "division by zero" exception Key: CALCITE-3717 URL: https://issues.apache.org/jira/browse/CALCITE-3717 Project: Calcite Issue