Re: Exception:Catch clause is unreachable

2020-07-21 Thread Danny Chan
It seems that you got some problem with the generated code, take this [1] to debug the code and to see which line caused the compilation error. [1]  https://calcite.apache.org/docs/howto.html#debugging-generated-classes-in-intellij Best, Danny Chan 在 2020年7月22日 +0800 AM12:17,taojin ,写道: > hi fol

Re: [DISCUSS] New Join Type: ANTI_NOTIN

2020-07-21 Thread Julian Hyde
Haisheng, You are confusing logical and physical algebra. A target DB might have physical operators that can implement several logical operators. Just because an IN list is represented as an OR it doesn’t mean that it has to be executed as an OR. We don’t HAVE TO add every physical operation i

Re: [VOTE] Release apache-calcite-1.24.0 (release candidate 0)

2020-07-21 Thread Rui Wang
+1 (non-binding) - downloaded the artifacts, checked hash, verified signature, built and ran tests. All are OK - use `diff -r` to compare the artifact and the git tag. Like what Julian has pointed out, I can find a difference about license but it can be addressed after this vote. -Rui On Tue, J

Re: Re: [DISCUSS] New Join Type: ANTI_NOTIN

2020-07-21 Thread Haisheng Yuan
Thanks Julian for explaining the NOT IN to everyone. I am sorry for not making myself clear. For that kind of simple 2-valued logic uncorrelated NOT IN subquery, SQL Server and Greenplum can generate efficient plan with null aware ANTI SEMI join. Hash ANTI SEMI Join for NOT IN Join Co

Re: Re: [DISCUSS] New Join Type: ANTI_NOTIN

2020-07-21 Thread Vladimir Sitnikov
Just in case: Oracle DB has 'null aware' joins. For instance: 'hash join anti na' which is a single join with two inputs. I expect that databases can implement 'not in' semantics efficiently (at least they should be more efficient than enumerable) Vladimir

Re: Re: [DISCUSS] New Join Type: ANTI_NOTIN

2020-07-21 Thread Julian Hyde
I want to remind everyone how hard it is to evaluate NOT IN queries. Here is an example query: sqlline> !connect jdbc:calcite:model=core/build/resources/test/hsqldb-model.json sa sa > !set outputFormat csv > EXPLAIN PLAN FOR SELECT * FROM dept WHERE deptno NOT IN (SELECT mgr FROM emp); EnumerableC

Exception:Catch clause is unreachable

2020-07-21 Thread taojin
hi folks, I has met a compiler error on calcite-core:1.23.0,jdk version is :openjdk version "11.0.7" 2020-04-14. Here is the error log,is this a bug? Exception in thread "main" java.sql.SQLException: Error while executing SQL "select * from test.t": Error while compiling generated Java code:

Exception:Catch clause is unreachable

2020-07-21 Thread tonytao
hi folks, I had met a compiler error on calcite-core:1.23.0,jdk version is :openjdk version "11.0.7" 2020-04-14. Here is the error log,is this a bug? Exception in thread "main" java.sql.SQLException: Error while executing SQL "select * from test.t": Error while compiling generated Java code:

Re: [DISCUSS] New RexNode: RexListCmp

2020-07-21 Thread Scott Reynolds
I wanted to reply and share our recent requirement for handling SQL like the following `error_code IN (3002, 3030)' and the challenges we faced. For our implementation on top of Apache Kudu, each disjunction creates a `Scanner' – a resource we need to limit as it represents a denial of service atta

Re: [VOTE] Release apache-calcite-1.24.0 (release candidate 0)

2020-07-21 Thread Ruben Q L
Hello everyone, Thanks Chunwei for taking care of this release. +1 (non binding) - Local Calcite build with tests (Windows10 + JDK8): OK - Calcite-based application test suite: OK Similarly to Enrico, I also found some issues with the deprecated version of the "standard" rules. Initially I had a

Re: custom metadata logic

2020-07-21 Thread Tal Glanzman
hi Danny, I didn't mention, but I use calcite 1.21.0. have attempted to use the function already with no success; it didn't seem to actually change the provider. have used the RelMetadataQuery.THREAD_PROVIDERS directly and it worked perfectly. i assume it is because the function RelOptCluster#se

Calcite-Master - Build # 1848 - Failure

2020-07-21 Thread Apache Jenkins Server
The Apache Jenkins build system has built Calcite-Master (build #1848) Status: Failure Check console output at https://builds.apache.org/job/Calcite-Master/1848/ to view the results.

Re: custom metadata logic

2020-07-21 Thread Danny Chan
The suggested way to set up the RelMetadataProvider is through RelOptCluster#setMetadataProvider [1]. If you want to customize the RelMetadataQuery, take the document in RelMetadataQueryBase [2] for a reference. [1]  https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/cal

Re: custom metadata logic

2020-07-21 Thread Tal Glanzman
thank you it is working great! On Tue, Jul 21, 2020 at 12:45 AM Stamatis Zampetakis wrote: > Hi Taz, > > If you are relying on the RelMetadataQuery [1] API then you may need to set > your provided into THREAD_PROVIDERS in a similar way that it is done in > RelMetadataTest [2]. > > Best, > Stamat

Re: [VOTE] Release apache-calcite-1.24.0 (release candidate 0)

2020-07-21 Thread Enrico Olivelli
+1 (non binding) - verified hashes and checksums - built from sources and run tests (JDK14 on Linux) - run tests of HerdDB and some client application I only had to fix a deprecation warning, changing from ReduceExpressionsRule.FILTER_INSTANCE to CoreRules.FILTER_REDUCE_EXPRESSIONS, see [1] below