Selectivity of BETWEEN predicates

2019-02-23 Thread Aman Sinha
Hi devs, I am trying to estimate the selectivity of BETWEEN predicates using histograms. Calcite will convert it to a conjunction. e.g WHERE c1 BETWEEN 10 and 20 ==> WHERE c1 >= 10 AND c1 <= 20 The question is : what's the formula for the selectivity of the top level AND expression ? Sinc

[GitHub] asereda-gs commented on a change in pull request #950: [CALCITE-2703] Reduce code generation and class loading overhead when executing queries in the EnumerableConvention (Stamatis Zampetakis

2019-02-23 Thread GitBox
asereda-gs commented on a change in pull request #950: [CALCITE-2703] Reduce code generation and class loading overhead when executing queries in the EnumerableConvention (Stamatis Zampetakis) URL: https://github.com/apache/calcite/pull/950#discussion_r259602022 ## File path: core

Re: Nanosecond precision timestamps?

2019-02-23 Thread Julian Hyde
IIRC the maximum precision of TIMESTAMP is part of the type system (RelDataTypeSystem). The default is 3 (milliseconds) but you could create your own type system where the value is 9 (nanoseconds) if you wish. If you are implementing your plans by generating Java code (i.e. using Enumerable con

[GitHub] julianhyde commented on a change in pull request #950: [CALCITE-2703] Reduce code generation and class loading overhead when executing queries in the EnumerableConvention (Stamatis Zampetakis

2019-02-23 Thread GitBox
julianhyde commented on a change in pull request #950: [CALCITE-2703] Reduce code generation and class loading overhead when executing queries in the EnumerableConvention (Stamatis Zampetakis) URL: https://github.com/apache/calcite/pull/950#discussion_r259599740 ## File path: core

[GitHub] zabetak commented on a change in pull request #950: [CALCITE-2703] Reduce code generation and class loading overhead when executing queries in the EnumerableConvention (Stamatis Zampetakis)

2019-02-23 Thread GitBox
zabetak commented on a change in pull request #950: [CALCITE-2703] Reduce code generation and class loading overhead when executing queries in the EnumerableConvention (Stamatis Zampetakis) URL: https://github.com/apache/calcite/pull/950#discussion_r259598356 ## File path: core/sr

Re: joins and low selectivity optimization

2019-02-23 Thread Andrei Sereda
> There are two tricky (but doable) parts: > 1) pass bound variables from one convention to the other; > 2) push the Filter (associated with the Correlate) holding the condition on the correlated variable to elastic; Do you know if any projects (libraries) already did this ? I would like to look a

Re: Failed to parse a PostgreSQL query using the Babel conformance

2019-02-23 Thread Muhammad Gelbana
Nevermind, I successfully parsed the operator and all test cases are passing. I'm working on implementing the operator now. Thanks, Gelbana On Thu, Feb 21, 2019 at 12:08 AM Muhammad Gelbana wrote: > I'm struggling with parsing the expressoin properly. If I simply add the > operator (i.e. ::) t

Calcite-Master - Build # 1037 - Failure

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

[GitHub] asereda-gs merged pull request #1065: [CALCITE-2863] ElasticSearch Adapter. select * and predicates on _MAP fail

2019-02-23 Thread GitBox
asereda-gs merged pull request #1065: [CALCITE-2863] ElasticSearch Adapter. select * and predicates on _MAP fail URL: https://github.com/apache/calcite/pull/1065 This is an automated message from the Apache Git Service. To r

correctly identifying "select *" for MAP row types

2019-02-23 Thread Andrei Sereda
Hello, I need to identify select * projection for a table with row-type defined as map(varchar, any). Example from elastic search : @Override public Re

[GitHub] asereda-gs opened a new pull request #1065: [CALCITE-2863] ElasticSearch Adapter. select * and predicates on _MAP fail

2019-02-23 Thread GitBox
asereda-gs opened a new pull request #1065: [CALCITE-2863] ElasticSearch Adapter. select * and predicates on _MAP fail URL: https://github.com/apache/calcite/pull/1065 Fix handling of `select *` in projections. Example of failing query: ```sql select * from elastic where _MAP['

[jira] [Created] (CALCITE-2863) ElasticSearch adapter. Query fails when filtering directly on _MAP

2019-02-23 Thread Andrei Sereda (JIRA)
Andrei Sereda created CALCITE-2863: -- Summary: ElasticSearch adapter. Query fails when filtering directly on _MAP Key: CALCITE-2863 URL: https://issues.apache.org/jira/browse/CALCITE-2863 Project: Cal

[GitHub] kgyrtkirk merged pull request #1044: [CALCITE-2838] Simplification: Remove redundant IS TRUE/IS NOT FALSE …

2019-02-23 Thread GitBox
kgyrtkirk merged pull request #1044: [CALCITE-2838] Simplification: Remove redundant IS TRUE/IS NOT FALSE … URL: https://github.com/apache/calcite/pull/1044 This is an automated message from the Apache Git Service. To respon

[jira] [Created] (CALCITE-2862) Deprecated ExprSimplifier causes some operands not being simplified

2019-02-23 Thread Rong Rong (JIRA)
Rong Rong created CALCITE-2862: -- Summary: Deprecated ExprSimplifier causes some operands not being simplified Key: CALCITE-2862 URL: https://issues.apache.org/jira/browse/CALCITE-2862 Project: Calcite