[jira] [Created] (CALCITE-3388) StackOverflowError for creating structured RelDataType from class type

2019-10-04 Thread Wang Yanlin (Jira)
Wang Yanlin created CALCITE-3388: Summary: StackOverflowError for creating structured RelDataType from class type Key: CALCITE-3388 URL: https://issues.apache.org/jira/browse/CALCITE-3388 Project:

Re: Re: RE: [EXT] Re: SqlRexConvertlet that Replicates "IN" Conversion Logic

2019-10-04 Thread Haisheng Yuan
As a workaround, you can modify you SqlRexConverlet, create a RexCall with balanced binary tree, e.g. (a=1 or a=2) or (a=3 or a=4), instead of a flat RexCall with multiple operands, e.g. a=1 or a=2 or a=3 or a=4. Because every OR RexCall has exactly 2 operands, it won't transform into SqlCall

Re: RE: [EXT] Re: SqlRexConvertlet that Replicates "IN" Conversion Logic

2019-10-04 Thread Haisheng Yuan
If you want to push the filter down to the source SQL sytem, then transforming to a join won't help you either. The reason of stackoverflow for large ORs is the left deep binary tree, we need to change it to balanced binary tree, to reduce the depth of the call. I will open a pull request

[jira] [Created] (CALCITE-3387) Query with GROUP BY and JOIN ... USING wrongly fails with "Column 'DEPTNO' is ambiguous" error

2019-10-04 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-3387: Summary: Query with GROUP BY and JOIN ... USING wrongly fails with "Column 'DEPTNO' is ambiguous" error Key: CALCITE-3387 URL: https://issues.apache.org/jira/browse/CALCITE-3387

[jira] [Created] (CALCITE-3386) CyclicMetadataException gives misleading stack trace

2019-10-04 Thread Zuozhi Wang (Jira)
Zuozhi Wang created CALCITE-3386: Summary: CyclicMetadataException gives misleading stack trace Key: CALCITE-3386 URL: https://issues.apache.org/jira/browse/CALCITE-3386 Project: Calcite

Calcite-Master - Build # 1359 - Failure

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

ApacheCon Europe 2019 talks which are relevant to Apache Calcite

2019-10-04 Thread myrle
Dear Apache Calcite committers, In a little over 2 weeks time, ApacheCon Europe is taking place in Berlin. Join us from October 22 to 24 for an exciting program and lovely get-together of the Apache Community. We are also planning a hackathon.  If your project is interested in

how to return dates in java/enumerable convention?

2019-10-04 Thread Jess Balint
I'm returning string objects from my enumerable, but getting an exception when trying to use the MONTH function which compiles to: org.apache.calcite.avatica.util.DateTimeUtils.unixDateExtract(org.apache.calcite.avatica.util.TimeUnitRange.MONTH,

RE: [EXT] Re: SqlRexConvertlet that Replicates "IN" Conversion Logic

2019-10-04 Thread Peter Wicks (pwicks)
Zoltan, Thanks for the suggestion. I actually tried doing a UDF first, and it was also successful, sorry for not sharing those details earlier. The problem with the UDF is that the predicates are not pushed down to the source SQL system (by design), and this can result in a 100x increase in

Adding RelOptMaterializations to a planner

2019-10-04 Thread Shubham Kumar
Hi contributors, I am trying to retrieve materialized view query rewrite from Calcite. In order to do that, I have created a planner and wanted to get the optimized relNode after applying Materializations which is equivalent to applying [1] present in Prepare class of Calcite. However, I am

Re: [EXT] Re: SqlRexConvertlet that Replicates "IN" Conversion Logic

2019-10-04 Thread Zoltan Haindrich
I think you might try another approach: introduce some UDF and use your translation logic to call that - as the UDF will be opaque for calcite it will be left alone. I guess Calcite might probably won't be able to do much with these ORs anyway... On 10/3/19 11:26 PM, Haisheng Yuan wrote: I