calcite.git
3 days ago[CALCITE-2782] Use server time zone by default if time zone is not specified in the... master
Justin Szeluga [Tue, 15 Jan 2019 18:15:15 +0000 (13:15 -0500)] 
[CALCITE-2782] Use server time zone by default if time zone is not specified in the user connection string (Justin Szeluga)

Close apache/calcite#1001

10 days agoSite: Add commit message guidelines for contributors (Stamatis Zampetakis)
Stamatis Zampetakis [Tue, 8 Jan 2019 15:01:48 +0000 (16:01 +0100)] 
Site: Add commit message guidelines for contributors (Stamatis Zampetakis)

Add guidelines for commit messages proposed by Julian Hyde in various discussions in the dev list.

12 days agoSite: Add Zoltan Haindrich as committer
Francis Chuang [Wed, 9 Jan 2019 21:48:15 +0000 (08:48 +1100)] 
Site: Add Zoltan Haindrich as committer

12 days agoSite: Elastic query example on _MAP
Andrei Sereda [Thu, 3 Jan 2019 16:33:36 +0000 (11:33 -0500)] 
Site: Elastic query example on _MAP

13 days ago[CALCITE-2635] getMonotonocity is slow on wide tables (Gian Merlino)
Gian Merlino [Sat, 20 Oct 2018 22:57:43 +0000 (15:57 -0700)] 
[CALCITE-2635] getMonotonocity is slow on wide tables (Gian Merlino)

Instead of getting the index of the column from rowType and then comparing
it to the collation field index, gets the collation field index and checks
if the corresponding rowType index matches.

fixes #891

13 days ago[CALCITE-2779] Remove References to StringBuffer (Beluga Behr)
Beluga Behr [Tue, 8 Jan 2019 22:22:19 +0000 (17:22 -0500)] 
[CALCITE-2779] Remove References to StringBuffer (Beluga Behr)

fixes #996

13 days ago[CALCITE-2344] Avoid inferring $0=null predicate from $0 IS NULL when $0 is not nullable
Laurent Goujon [Thu, 31 May 2018 15:27:29 +0000 (08:27 -0700)] 
[CALCITE-2344] Avoid inferring $0=null predicate from $0 IS NULL when $0 is not nullable

fixes #714

13 days ago[CALCITE-2778] Remove ClosableAllocation, ClosableAllocationOwner, CompoundClosableAl...
Beluga Behr [Tue, 8 Jan 2019 20:35:40 +0000 (15:35 -0500)] 
[CALCITE-2778] Remove ClosableAllocation, ClosableAllocationOwner, CompoundClosableAllocation (BELUGA BEHR)

fixes #994

2 weeks ago[CALCITE-2249] AggregateJoinTransposeRule generates inequivalent nodes if Aggregate...
beyond1920 [Wed, 11 Apr 2018 08:23:21 +0000 (16:23 +0800)] 
[CALCITE-2249] AggregateJoinTransposeRule generates inequivalent nodes if Aggregate relNode contains distinct aggregate function (jingzhang)

fixes #661

2 weeks agoCALCITE-2375 EnumerableDefaults.join_() leaks connections (Pavel Gubin)
Pavel [Fri, 22 Jun 2018 09:07:59 +0000 (12:07 +0300)] 
CALCITE-2375 EnumerableDefaults.join_() leaks connections (Pavel Gubin)

fixes #739

2 weeks ago[CALCITE-2437] FilterMultiJoinMerge should combine filters from Filter relation and...
Laurent Goujon [Fri, 21 Dec 2018 17:54:55 +0000 (09:54 -0800)] 
[CALCITE-2437] FilterMultiJoinMerge should combine filters from Filter relation and multijoin post-join filters

The FilterMultiJoinMergeRule class is intended to combine a filter on
top of a multi join into a single multijoin. But instead of combining
the post join filter with the filter's condition, it simply replaces
it.

Fixing the issue by composing a conjuction of the two filters and
adding it to the new multijoin.

fixes #977

2 weeks ago[CACITE-2629] Remove call to CatalogReader#getAllSchemaObjects
Laurent Goujon [Wed, 17 Oct 2018 21:38:30 +0000 (14:38 -0700)] 
[CACITE-2629] Remove call to CatalogReader#getAllSchemaObjects

CatalogScope constructor makes a call to CatalogReader#getAllSchemaObjects
and stores its result into a private field which is not used by the
class itself, nor has some accessor other class could use.

Removing this call as it might be expensive on some systems.

fixes #888

2 weeks ago[CALCITE-2762] Quidem env variable is always false if its name is separated by dot...
hongzezhang [Thu, 3 Jan 2019 10:23:16 +0000 (18:23 +0800)] 
[CALCITE-2762] Quidem env variable is always false if its name is separated by dot(.) (Hongze Zhang)

fixes #987

2 weeks ago[CALCITE-2623] Add specific translation for POSITION, MOD and set operators in BigQue...
krishnakant.agrawal [Wed, 19 Dec 2018 11:08:22 +0000 (16:38 +0530)] 
[CALCITE-2623] Add specific translation for POSITION, MOD and set operators in BigQuery and Hive SQL dialects

Close apache/calcite#877

2 weeks ago[CALCITE-2554] Enrich enumerable join operators with order preserving information...
Stamatis Zampetakis [Wed, 19 Sep 2018 09:25:37 +0000 (11:25 +0200)] 
[CALCITE-2554] Enrich enumerable join operators with order preserving information (Stamatis Zampetakis)

1. Introduce collation metadata information for EnumerableJoin, EnumerableThetaJoin, EnumerableSemiJoin, and EnumerableCorrelate.

2. Modify static factory create methods to obtain the collation information from the metadata.

3. Change EnumerableJoinRule, EnumerableCorrelateRule to use the static factory method to create the operators.

4. Add SortRemoveRuleTest, exploiting the preserved collation of various enumerable join operatrs to remove a sort.

5. Adapt sql/join.iq removing redundant sort operators.

6. Adapt sql/sub-query.iq due to CALCITE-2582.

7. Add tests verifying the order preserving properties of the join algorithms in EnumerableDefaults.

2 weeks ago[CALCITE-2471] Shorten AbstractRelNode#computeDigest() digest (Laurent Goujon)
Laurent Goujon [Thu, 16 Aug 2018 15:54:16 +0000 (08:54 -0700)] 
[CALCITE-2471] Shorten AbstractRelNode#computeDigest() digest (Laurent Goujon)

Digest/description created by AbstractRelNode#computeDigest includes
the description of each of its inputs, causing the final string to
be excessively long (e.g. the top level node of a tree containing
the string representation of the whole tree).

Change the function to not use the input's description but instead
its original description which is <typeName>#<id>.

fixes #795

2 weeks ago[CALCITE-2767] Fix conversion of Case in RexSqlStandardConvertletTable (Benoit Hanotte)
Benoit Hanotte [Wed, 2 Jan 2019 10:56:57 +0000 (11:56 +0100)] 
[CALCITE-2767] Fix conversion of Case in RexSqlStandardConvertletTable (Benoit Hanotte)

`SqlCaseOperator.createCall()` requires 4 operands [1]:
 1. first value (i.e. CASE value WHEN...)
 2. when condifitions (as SqlNodeList)
 3. then values (as SqlNodeLists)
 4. else value

`RexSqlStandardConvertletTable` always only pass 3 arguments [2] as it uses the generic form such as
`CASE WHEN condition1 THEN val2 ... ELSE val3 END` and never the form
`CASE val WHEN condition1 THEN val2 ELSE val3`.

When calling `SqlCaseOperator.createCall()`, it needs to pass a null sql node for the first value in
order to correctly provide the 4 expected arguments and not only the last 3.

[1] https://github.com/apache/calcite/blob/59b76701d9c805f51b0929577ca604fdbfe00b0b/core/src/main/java/org/apache/calcite/sql/fun/SqlCaseOperator.java#L288
[2] https://github.com/apache/calcite/blob/59b76701d9c805f51b0929577ca604fdbfe00b0b/core/src/main/java/org/apache/calcite/rex/RexSqlStandardConvertletTable.java#L239

fixes #990

2 weeks ago[CALCITE-2765] Bump Janino dependency to 3.0.11 (Fokko Driesprong)
Fokko Driesprong [Thu, 3 Jan 2019 16:04:30 +0000 (17:04 +0100)] 
[CALCITE-2765] Bump Janino dependency to 3.0.11 (Fokko Driesprong)

Fixes some small issues and NPE fixes http://janino-compiler.github.io/janino/changelog.html

fixes #988

2 weeks agoSite: fix JSON syntax error at file adapter page (Marc Prud'hommeaux)
Marc Prud'hommeaux [Wed, 12 Dec 2018 02:35:20 +0000 (21:35 -0500)] 
Site: fix JSON syntax error at file adapter page (Marc Prud'hommeaux)

The "tables" operand should take an array, but the JSON example doesn't wrap the two tables in brackets.

fixes #965

2 weeks agoSite: fix typo at the main page (Marc Prud'hommeaux)
Marc Prud'hommeaux [Sun, 16 Dec 2018 02:00:27 +0000 (21:00 -0500)] 
Site: fix typo at the main page (Marc Prud'hommeaux)

fixes #974

2 weeks ago[CALCITE-2625] Jdbc adapter: print Window Frame Boundary only for those aggregates...
krishnakant.agrawal [Wed, 19 Dec 2018 15:29:14 +0000 (20:59 +0530)] 
[CALCITE-2625] Jdbc adapter: print Window Frame Boundary only for those aggregates that support it (KrishnaKant Agrawal)

fixes #889

2 weeks ago[CALCITE-2768] PlannerTest ignores top-level order by clause (~RootRel.collation)
Vladimir Sitnikov [Thu, 3 Jan 2019 18:58:55 +0000 (21:58 +0300)] 
[CALCITE-2768] PlannerTest ignores top-level order by clause (~RootRel.collation)

2 weeks agoRevert "[CALCITE-2764] RelCompositeTrait#satisfies does not work for non-trivial...
Vladimir Sitnikov [Thu, 3 Jan 2019 18:01:42 +0000 (21:01 +0300)] 
Revert "[CALCITE-2764] RelCompositeTrait#satisfies does not work for non-trivial traits"

This reverts commit 92978d981e6ca2eb352c1654d14c7b64fb8710fd.

2 weeks ago[CALCITE-2764] RelCompositeTrait#satisfies does not work for non-trivial traits
Vladimir Sitnikov [Thu, 3 Jan 2019 15:04:03 +0000 (18:04 +0300)] 
[CALCITE-2764] RelCompositeTrait#satisfies does not work for non-trivial traits

2 weeks ago[CALCITE-2436] Steps for building site under Windows, misprint fix in SQL Language...
snuyanzin [Wed, 1 Aug 2018 14:15:40 +0000 (17:15 +0300)] 
[CALCITE-2436] Steps for building site under Windows, misprint fix in SQL Language page

2 weeks agoElasticSearch adapter. Remove dead (or unnecessary) code.
Andrei Sereda [Thu, 3 Jan 2019 00:50:00 +0000 (19:50 -0500)] 
ElasticSearch adapter. Remove dead (or unnecessary) code.

Remove class `ElasticsearchFilter.Translator`.
Remove redundant field quoting in `ElasticsearchRules.RexToElasticsearchTranslator`.

2 weeks ago[CALCITE-2733] Use catalog and schema from JDBC connection string to retrieve tables...
Jesus Camacho Rodriguez [Fri, 7 Dec 2018 23:42:13 +0000 (15:42 -0800)] 
[CALCITE-2733] Use catalog and schema from JDBC connection string to retrieve tables if specified

Close apache/calcite#962

2 weeks ago[CALCITE-2732] Upgrade postgresql driver version
Jesus Camacho Rodriguez [Fri, 7 Dec 2018 23:37:28 +0000 (15:37 -0800)] 
[CALCITE-2732] Upgrade postgresql driver version

Close apache/calcite#961

2 weeks ago[CALCITE-2727] MV rewriting bails out incorrectly when a view does not contain any...
LantaoJin [Thu, 6 Dec 2018 03:14:01 +0000 (11:14 +0800)] 
[CALCITE-2727] MV rewriting bails out incorrectly when a view does not contain any table reference

Close apache/calcite#957

2 weeks ago[CALCITE-2760] ElasticSearch adapter. Support sorting on unmapped fields (eg. _MAP...
Andrei Sereda [Wed, 2 Jan 2019 22:20:02 +0000 (17:20 -0500)] 
[CALCITE-2760] ElasticSearch adapter. Support sorting on unmapped fields (eg. _MAP['city'])

Previously queries like below failed due to missing mapping between projections and items (as in `_MAP['foo']`):

```sql
select * from elastic order by _MAP['city']
select _MAP['city'] from elastic order by _MAP['state']
```

Reuse mapping from `ElasticsearchRel.Implementor.expressionItemMap` in `ElasticsearchSort` if
current elastic field name is unknown (like `EXPR$0`).

Closes #985

2 weeks ago[CALCITE-2755] Expose document _id field when querying ElasticSearch
Andrei Sereda [Mon, 24 Dec 2018 18:56:59 +0000 (13:56 -0500)] 
[CALCITE-2755] Expose document _id field when querying ElasticSearch

Allow user to query (project) [_id](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-id-field.html) field
explicitly.

Note that (by default) meta fields are not available for `select *` type of queries and have to be explicitly listed in projection
like `select _MAP['_id'], _MAP['a'] from elastic`.

Add additional mapping between calcite expression `EXPR$n` and item name `foo.bar` (as part of `_MAP['foo.bar']`).
This information is otherwise lost during query translation.

Closes #982

3 weeks ago[CALCITE-2759] Update maven-remote-resources-plugin to 1.6.0
Vladimir Sitnikov [Sat, 29 Dec 2018 20:47:08 +0000 (23:47 +0300)] 
[CALCITE-2759] Update maven-remote-resources-plugin to 1.6.0

See also CALCITE-537 Support skip overwrite in maven-remote-resources-pluginīœˆ

3 weeks agoSite: News item for release 1.18
Julian Hyde [Fri, 21 Dec 2018 10:26:21 +0000 (02:26 -0800)] 
Site: News item for release 1.18

Add disclaimer to downloads page that github links are not for source code.

3 weeks agoSite: Rename MapD to OmniSci, and update logos
Julian Hyde [Thu, 18 Oct 2018 01:01:40 +0000 (18:01 -0700)] 
Site: Rename MapD to OmniSci, and update logos

3 weeks agoUpdate site for new repository
Michael Mior [Wed, 26 Dec 2018 01:26:57 +0000 (20:26 -0500)] 
Update site for new repository

3 weeks agoUpdate git URL
Michael Mior [Wed, 26 Dec 2018 01:12:46 +0000 (20:12 -0500)] 
Update git URL

4 weeks agoSite: ElasticAdapter mention supported versions (and support schedule)
Andrei Sereda [Mon, 24 Dec 2018 20:08:32 +0000 (15:08 -0500)] 
Site: ElasticAdapter mention supported versions (and support schedule)

4 weeks agoSite: Improve documentation for ElasticSearch Adapter
Andrei Sereda [Mon, 24 Dec 2018 19:15:57 +0000 (14:15 -0500)] 
Site: Improve documentation for ElasticSearch Adapter

1. Clarify documentation on Scroll API usage in ElasticSearch adapter
2. Remove stale mention of missing support for aggregations.
3. Remove links to old ES adapters: calcite-elasticsearch2 and calcite-elasticsearch5

4 weeks ago[CALCITE-2463] Silence ERROR logs from CalciteException, SqlValidatorException
Vladimir Sitnikov [Sun, 19 Aug 2018 15:59:13 +0000 (18:59 +0300)] 
[CALCITE-2463] Silence ERROR logs from CalciteException, SqlValidatorException

Output exception messages to logger only in calcite.debug=true mode

Close #797

4 weeks agoSite: Update PMC chair
Francis Chuang [Sat, 22 Dec 2018 22:46:08 +0000 (09:46 +1100)] 
Site: Update PMC chair

5 weeks ago[maven-release-plugin] prepare for next development iteration branch-1.18
Julian Hyde [Tue, 18 Dec 2018 19:34:00 +0000 (11:34 -0800)] 
[maven-release-plugin] prepare for next development iteration

5 weeks ago[maven-release-plugin] prepare release calcite-1.18.0 calcite-1.18.0
Julian Hyde [Tue, 18 Dec 2018 19:33:17 +0000 (11:33 -0800)] 
[maven-release-plugin] prepare release calcite-1.18.0

5 weeks ago[CALCITE-2575] Release Calcite 1.18.0
Julian Hyde [Mon, 3 Dec 2018 03:58:56 +0000 (19:58 -0800)] 
[CALCITE-2575] Release Calcite 1.18.0

Release notes; change version numbers.

Update release instructions in HOWTO.

5 weeks ago[CALCITE-2673] Default implementation of SqlDialect should not support pushing all...
Jesus Camacho Rodriguez [Fri, 14 Dec 2018 00:46:39 +0000 (16:46 -0800)] 
[CALCITE-2673] Default implementation of SqlDialect should not support pushing all functions

* Adding ROW operator as supported by default

5 weeks ago[CALCITE-2731] RexProgramBuilder makes unsafe simplifications to CASE expressions...
Zoltan Haindrich [Fri, 7 Dec 2018 16:28:10 +0000 (17:28 +0100)] 
[CALCITE-2731] RexProgramBuilder makes unsafe simplifications to CASE expressions (Zoltan Haindrich)

Simplification treated LocalRefs as safe expressions; which was wrong,
since they might be used to reference expressions such as x / 0.

Close apache/calcite#960

5 weeks ago[CALCITE-2730] RelBuilder incorrectly simplifies a filter with duplicate conjunction...
Stamatis Zampetakis [Fri, 7 Dec 2018 16:16:57 +0000 (17:16 +0100)] 
[CALCITE-2730] RelBuilder incorrectly simplifies a filter with duplicate conjunction to empty (Stamatis Zampetakis)

1. Modify RexSimplify#processRange method to replace at most one term
   at a time.
2. Add unit test reproducing the problem.
3. Add missing filter in the expected plan of
   RelOptRulesTest#testMergeJoinFilter.
4. Add utility method RexUtil#replaceFirst.

Move RexUtil.replaceFirst into RexSimplify;
change it to replaceLast, so that it simplifies (x, y, x) to (x, y)
rather than the less intuitive (y, x). (Julian Hyde)

Close apache/calcite#959

6 weeks ago[CALCITE-2670] Combine similar JSON aggregate functions in operator table
hongzezhang [Wed, 14 Nov 2018 11:48:49 +0000 (19:48 +0800)] 
[CALCITE-2670] Combine similar JSON aggregate functions in operator table

Convert parameters from Enum to more specific types;
include varying flag values in JSON aggregate functions.

Some cosmetic stuff.

Close apache/calcite#916

6 weeks ago[CALCITE-2468] Validator throws IndexOutOfBoundsException when trying to infer operan...
Rong Rong [Tue, 21 Aug 2018 00:16:19 +0000 (17:16 -0700)] 
[CALCITE-2468] Validator throws IndexOutOfBoundsException when trying to infer operand type from STRUCT return type (Rong Rong)

Add example in server module's type.iq test.
Fix type inference when operator is AS with a complex row of just 1 element.

Close apache/calcite#932

6 weeks ago[CALCITE-2726] ReduceExpressionRule oversimplifies filter conditions containing nulls
Zoltan Haindrich [Wed, 5 Dec 2018 15:32:50 +0000 (16:32 +0100)] 
[CALCITE-2726] ReduceExpressionRule oversimplifies filter conditions containing nulls

ReduceExpressionsRule might have simplified "(empno=null and mgr=1) is
null" to "false".

Add test case based on [HIVE-20617];
deprecate ExprSimplifier (Julian Hyde)

Close apache/calcite#956

7 weeks ago[CALCITE-2716] Upgrade to Avatica 1.13.0
Julian Hyde [Wed, 28 Nov 2018 23:53:56 +0000 (15:53 -0800)] 
[CALCITE-2716] Upgrade to Avatica 1.13.0

Also upgrade to
jetty 9.4.11.v20180605
maven-scm-provider 1.10.0
mockito 2.22.0
owasp-dependency-check 3.3.2
slf4j 1.7.25

7 weeks ago[CALCITE-2596] When translating correlated variables in enumerable convention, conver...
Stamatis Zampetakis [Wed, 26 Sep 2018 12:03:29 +0000 (14:03 +0200)] 
[CALCITE-2596] When translating correlated variables in enumerable convention, convert not-null boxed primitive values to primitive (Stamatis Zampetakis)

Apply nullAs policy when translating expressions with correlated variables.

Close apache/calcite#868

7 weeks ago[CALCITE-2684] RexBuilder gives AssertionError when creating integer literal larger...
rubenada [Mon, 19 Nov 2018 15:46:02 +0000 (16:46 +0100)] 
[CALCITE-2684] RexBuilder gives AssertionError when creating integer literal larger than 2^63 (Ruben Quesada Lopez)

Close apache/calcite#928

For [CALCITE-2701]:
Close apache/calcite#935

7 weeks ago[CALCITE-2719] In JDBC adapter for MySQL, fix cast to INTEGER and BIGINT (Piotr Bojko)
Piotr Bojko [Sun, 2 Dec 2018 22:04:12 +0000 (23:04 +0100)] 
[CALCITE-2719] In JDBC adapter for MySQL, fix cast to INTEGER and BIGINT (Piotr Bojko)

MySQL does not support casts to INTEGER and BIGINT; instead we must
cast to SIGNED.

Close apache/calcite#953

7 weeks ago[CALCITE-2713] JDBC adapter may generate casts on PostgreSQL for VARCHAR type exceedi...
Jesus Camacho Rodriguez [Mon, 3 Dec 2018 22:15:52 +0000 (14:15 -0800)] 
[CALCITE-2713] JDBC adapter may generate casts on PostgreSQL for VARCHAR type exceeding max length

Close apache/calcite#944

7 weeks ago[CALCITE-2709] In Geode adapter, allow filtering on DATE, TIME, TIMESTAMP fields...
chadasa [Sat, 1 Dec 2018 15:14:09 +0000 (20:44 +0530)] 
[CALCITE-2709] In Geode adapter, allow filtering on DATE, TIME, TIMESTAMP fields (Sandeep Chada)

GeodeFilter changes to support filtering with datetime types (DATE,
TIME, TIMESTAMP).

Close apache/calcite#952

7 weeks ago[CALCITE-2529] All numbers are in the same type family (Andrew Pilloud)
Andrew Pilloud [Fri, 17 Aug 2018 22:44:01 +0000 (15:44 -0700)] 
[CALCITE-2529] All numbers are in the same type family (Andrew Pilloud)

The linq4j code generator fails to generate calls to functions
when there is a mix between integer and floating point arguments.
This is due to the incorrect assumption that java integer types
can not be assigned to floating point types. This change fixes
the assignment mapping, enabling the generator to call floating
point functions with integer arguments.

Close apache/calcite#818

7 weeks ago[CALCITE-2662] In Planner, allow parsing a stream (Reader) instead of a String (Enric...
Enrico Olivelli [Thu, 8 Nov 2018 07:10:18 +0000 (08:10 +0100)] 
[CALCITE-2662] In Planner, allow parsing a stream (Reader) instead of a String (Enrico Olivelli)

Add SourceStringReader, a simple sub-class of StringReader that
remembers the original string. This allows us to use Reader for most
parser methods, knowing we can find the string if the parser was
invoked on a string, but null if it was invoked on an infinite reader.

Close apache/calcite#906

7 weeks ago[CALCITE-2699] TIMESTAMPADD function now applies to DATE and TIME as well as TIMESTAM... 939/head
xuqianjin [Fri, 23 Nov 2018 14:15:20 +0000 (22:15 +0800)] 
[CALCITE-2699] TIMESTAMPADD function now applies to DATE and TIME as well as TIMESTAMP (xuqianjin)

Close apache/calcite#936

7 weeks ago[CALCITE-2701] Make generated Baz classes immutable
Stamatis Zampetakis [Fri, 23 Nov 2018 10:58:10 +0000 (11:58 +0100)] 
[CALCITE-2701] Make generated Baz classes immutable

Revert the workaround introduced in EnumerableRelImplementor due to JANINO-169.

7 weeks ago[CALCITE-2619] Reduce string literal creation cost by deferring and caching charset...
Ted Xu [Sat, 10 Nov 2018 06:46:24 +0000 (14:46 +0800)] 
[CALCITE-2619] Reduce string literal creation cost by deferring and caching charset conversion (Ted Xu)

Close apache/calcite#911

7 weeks ago[CALCITE-2679] In Elasticsearch adapter, implement DISTINCT and GROUP BY without...
liusiyuan1 [Sun, 18 Nov 2018 15:28:29 +0000 (23:28 +0800)] 
[CALCITE-2679] In Elasticsearch adapter, implement DISTINCT and GROUP BY without aggregate function (Siyuan Liu)

This commit mainly fixed 3 bugs:
1. Group by and distinct query enter the wrong execution branch.
   [ElasticsearchTable:126]
2. Values in agg bucket loses a part after returning as a result.
   [ElasticsearchJson:83-93, 546-551]
3. Logic of removing empty agg blocks can not work. [Elasticsearch:240-254]

Close apache/calcite#927

7 weeks ago[CALCITE-2688] Improve diagnosability when validator cannot infer a return type ...
Zoltan Haindrich [Tue, 20 Nov 2018 08:28:20 +0000 (09:28 +0100)] 
[CALCITE-2688] Improve diagnosability when validator cannot infer a return type (Zoltan Haindrich)

Close apache/calcite#930

7 weeks ago[CALCITE-2720] RelMetadataQuery.getTableOrigin throws IndexOutOfBoundsException if...
Zoltan Haindrich [Fri, 30 Nov 2018 14:49:15 +0000 (15:49 +0100)] 
[CALCITE-2720] RelMetadataQuery.getTableOrigin throws IndexOutOfBoundsException if RelNode has no columns (Zoltan Haindrich)

An example is an Aggregate with empty groupKey an no aggregate
functions. Occurs during LoptOptimizeJoinRule.

Close apache/calcite#949

An unrelated PR that we also wish to close:
Close apache/calcite#939

7 weeks ago[CALCITE-2717] Use Interner instead of LoadingCache to cache traits to allow GC ...
Haisheng Yuan [Fri, 30 Nov 2018 22:25:20 +0000 (14:25 -0800)] 
[CALCITE-2717] Use Interner instead of LoadingCache to cache traits to allow GC (Haisheng Yuan)

Even though canonicalMap's value is soft referenced, key is strong referenced,
key and value are referencing the same object. So traits in the cache will
never be garbage-collected, which may cause OOM if we have tons of different
traits. This issue has been fixed by caching traits using Interner instead of
LoadingCache. In addition, canonizeComposite is removed, since canonize can do
the same work.

Close apache/calcite#951

7 weeks ago[CALCITE-2542] In SQL parser, allow '. field' to follow expressions other than tables...
Rong Rong [Tue, 20 Nov 2018 00:42:10 +0000 (16:42 -0800)] 
[CALCITE-2542] In SQL parser, allow '. field' to follow expressions other than tables and columns (Rong Rong)

Fix how SqlNode AtomicRowExpression + DOT operation is parsed, adding
in <DOT> parser for expression2b for parsing additional identifier
after AtomicRowExpression.

Close apache/calcite#933

7 weeks ago[CALCITE-2705] Site: Remove duplicate "selectivity" in list of metadata types (Alan...
LantaoJin [Mon, 26 Nov 2018 12:06:44 +0000 (20:06 +0800)] 
[CALCITE-2705] Site: Remove duplicate "selectivity" in list of metadata types (Alan Jin)

Close apache/calcite#940

7 weeks ago[CALCITE-2637] In SQL parser, allow prefix '-' between BETWEEN and AND (Qi Yu)
park.yq [Mon, 26 Nov 2018 13:12:45 +0000 (21:12 +0800)] 
[CALCITE-2637] In SQL parser, allow prefix '-' between BETWEEN and AND (Qi Yu)

For example, "WHERE deptno BETWEEN - deptno AND 5".

Fix Mimer URL; add a test (Julian Hyde)

Close apache/calcite#941

7 weeks ago[CALCITE-2632] Ensure that RexNode and its sub-classes implement hashCode and equals...
Zoltan Haindrich [Mon, 26 Nov 2018 14:58:50 +0000 (15:58 +0100)] 
[CALCITE-2632] Ensure that RexNode and its sub-classes implement hashCode and equals methods (Zoltan Haindrich)

Previously there was no default hashCode/equals implementations. To
ensure that they are working properly is crucial while working with
basic collections like sets/maps.

Fix ups (Julian Hyde):

* Use Objects.equals(x, y) in preference to x.equals(y) only when x or y
 may be null; and use x == y when objects are primitive.

* When implementing Object.equals, use the pattern

  return this == obj
    || obj instanceof Type
    && a.equals(((Type) obj).a) ...

  whenever possible.

* In the many cases where RexNode.toString() is used as a key in
  collections, use the raw RexNode instead.

Close apache/calcite#943

7 weeks ago[CALCITE-2715] In JDBC adapter, do not generate character set in data types for MS...
Piotr Bojko [Wed, 28 Nov 2018 11:12:54 +0000 (12:12 +0100)] 
[CALCITE-2715] In JDBC adapter, do not generate character set in data types for MS SQL Server (Piotr Bojko)

MS SQL Server does not support character set as part of data type.

Close apache/calcite#945

7 weeks ago[CALCITE-2689] In ElasticSearch adapter, allow grouping on non-textual fields like...
Andrei Sereda [Tue, 20 Nov 2018 05:10:47 +0000 (00:10 -0500)] 
[CALCITE-2689] In ElasticSearch adapter, allow grouping on non-textual fields like date and number

Consider field type when populating `missing` (value) in Elasticsearch
terms aggregations.

Close apache/calcite#946

7 weeks ago[CALCITE-2714] Make BasicSqlType immutable, and now SqlTypeFactory.createWithNullabil...
rubenada [Thu, 29 Nov 2018 10:08:03 +0000 (11:08 +0100)] 
[CALCITE-2714] Make BasicSqlType immutable, and now SqlTypeFactory.createWithNullability can reuse existing type if possible (Ruben Quesada Lopez)

Close apache/calcite#947

7 weeks ago[CALCITE-2695] Simplify casts which are only widening nullability (Zoltan Haindrich)
Zoltan Haindrich [Thu, 22 Nov 2018 17:31:09 +0000 (18:31 +0100)] 
[CALCITE-2695] Simplify casts which are only widening nullability (Zoltan Haindrich)

Close apache/calcite#934

7 weeks ago[CALCITE-2687] Is distinct from could lead to Exceptions in ReduceExpressionRule...
Zoltan Haindrich [Tue, 20 Nov 2018 08:28:20 +0000 (09:28 +0100)] 
[CALCITE-2687] Is distinct from could lead to Exceptions in ReduceExpressionRule (Zoltan Haindrich)

Close apache/calcite#929

7 weeks ago[CALCITE-2671] GeodeFilter convert multiple ORs (on same attribute) into single IN...
chadasa [Sat, 24 Nov 2018 07:13:24 +0000 (12:43 +0530)] 
[CALCITE-2671] GeodeFilter convert multiple ORs (on same attribute) into single IN SET. (Sandeep Chada)

Geode IN SET operator has better performance than multiple ORs (even if they're equivalent)

foo = 1 or foo = 2 or foo = 3
-- equivalent to (but much faster in geode)
foo in SET(1, 2, 3)

closes apache/calcite#942

7 weeks ago[CALCITE-2673] SqlDialect supports pushing of all functions by default
Jesus Camacho Rodriguez [Wed, 14 Nov 2018 21:01:38 +0000 (13:01 -0800)] 
[CALCITE-2673] SqlDialect supports pushing of all functions by default

Close apache/calcite#918

8 weeks ago[CALCITE-2711] Upgrade SQLLine to 1.6.0
Julian Hyde [Tue, 27 Nov 2018 03:45:19 +0000 (19:45 -0800)] 
[CALCITE-2711] Upgrade SQLLine to 1.6.0

2 months ago[CALCITE-2675] Type validation error as ReduceExpressionRule fails to preserve type...
Zoltan Haindrich [Thu, 15 Nov 2018 16:42:01 +0000 (17:42 +0100)] 
[CALCITE-2675] Type validation error as ReduceExpressionRule fails to preserve type nullability (Zoltan Haindrich)

Close apache/calcite#922

2 months ago[CALCITE-563] In JDBC adapter, push bindable parameters down to the underlying JDBC...
Vladimir Sitnikov [Mon, 5 Nov 2018 15:57:50 +0000 (18:57 +0300)] 
[CALCITE-563] In JDBC adapter, push bindable parameters down to the underlying JDBC data source (Vladimir Sitnikov, Piotr Bojko)

Fix up, moving JdbcPreparedStatementUtils methods into
ResultSetEnumerable, and fixing some comments and typos. (Julian Hyde)

Close apache/calcite#907
Close apache/calcite#902

2 months ago[CALCITE-2678] RelBuilderTest#testRelBuilderToString fails on Windows (Stamatis Zampe...
Stamatis Zampetakis [Fri, 16 Nov 2018 15:11:16 +0000 (16:11 +0100)] 
[CALCITE-2678] RelBuilderTest#testRelBuilderToString fails on Windows (Stamatis Zampetakis)

Close apache/calcite#924

2 months ago[CALCITE-2663] Add CREATE and DROP FUNCTION (ambition119)
ambition119 [Thu, 8 Nov 2018 12:28:12 +0000 (20:28 +0800)] 
[CALCITE-2663] Add CREATE and DROP FUNCTION (ambition119)

Syntax is similar to Apache Hive's function syntax.

Close apache/calcite#908
Close apache/calcite#920
Close apache/calcite#913

2 months ago[CALCITE-2651] Enable scrolling in ElasticSearch adapter for basic search queries 919/head
Andrei Sereda [Thu, 1 Nov 2018 02:35:33 +0000 (22:35 -0400)] 
[CALCITE-2651] Enable scrolling in ElasticSearch adapter for basic search queries

The only efficient way to fetch full (large) result set in elastic is to use scrolling.

Note that behaviour remains unchanged for queries with aggregates and offsets
(like explicit pagination using `from`).

2 months ago[CALCITE-2669] RelMdTableReferences should check whether references inferred from...
Jesus Camacho Rodriguez [Tue, 13 Nov 2018 22:00:17 +0000 (14:00 -0800)] 
[CALCITE-2669] RelMdTableReferences should check whether references inferred from input are null for Union/Join operators

2 months agoRemove incorrect "Not implemented" message from CALCITE-2031
Michael Mior [Tue, 13 Nov 2018 21:15:10 +0000 (16:15 -0500)] 
Remove incorrect "Not implemented" message from CALCITE-2031

2 months ago[CALCITE-2668] Support for left/right outer join in RelMdExpressionLineage (addendum)
Jesus Camacho Rodriguez [Tue, 13 Nov 2018 19:26:50 +0000 (11:26 -0800)] 
[CALCITE-2668] Support for left/right outer join in RelMdExpressionLineage (addendum)

Catch UnsupportedOperationException in RelMdExpressionLineage

2 months ago[CALCITE-2668] Support for left/right outer join in RelMdExpressionLineage
Jesus Camacho Rodriguez [Tue, 13 Nov 2018 16:42:35 +0000 (08:42 -0800)] 
[CALCITE-2668] Support for left/right outer join in RelMdExpressionLineage

2 months ago[CALCITE-2660] OsAdapterTest should check if required commands are available
Kevin Risden [Mon, 12 Nov 2018 16:30:19 +0000 (11:30 -0500)] 
[CALCITE-2660] OsAdapterTest should check if required commands are available

Close apache/calcite#914

Signed-off-by: Kevin Risden <krisden@apache.org>
2 months ago[CALCITE-2661] In RelBuilder, add methods for creating Exchange and SortExchange...
chunwei.lcw [Fri, 9 Nov 2018 03:30:29 +0000 (11:30 +0800)] 
[CALCITE-2661] In RelBuilder, add methods for creating Exchange and SortExchange relational expressions (Chunwei Lei)

Close apache/calcite#910

2 months agoFollowing [CALCITE-2266], remove an unwanted dependency
Julian Hyde [Mon, 12 Nov 2018 20:22:58 +0000 (12:22 -0800)] 
Following [CALCITE-2266], remove an unwanted dependency

Also, cosmetic changes: spaces and indentation

2 months agoFix invocation of deprecated constructor of SqlAggFunction (Hongze Zhang)
Hongze Zhang [Sat, 10 Nov 2018 17:39:20 +0000 (01:39 +0800)] 
Fix invocation of deprecated constructor of SqlAggFunction (Hongze Zhang)

2 months ago[CALCITE-2266] Implement SQL:2016 JSON functions: JSON_EXISTS, JSON_VALUE, JSON_QUERY...
Michael Mior [Fri, 9 Nov 2018 16:39:20 +0000 (11:39 -0500)] 
[CALCITE-2266] Implement SQL:2016 JSON functions: JSON_EXISTS, JSON_VALUE, JSON_QUERY, JSON_OBJECT, JSON_OBJECTAGG, JSON_ARRAY, JSON_ARRAYAGG, IS JSON predicate (Hongze Zhang)

Close apache/calcite#785

2 months agoOops, let's stay on sqlline-1.5 for now
Julian Hyde [Thu, 8 Nov 2018 19:33:21 +0000 (11:33 -0800)] 
Oops, let's stay on sqlline-1.5 for now

2 months ago[CALCITE-2652] SqlNode to SQL conversion fails if the join condition references a...
Zoltan Haindrich [Thu, 1 Nov 2018 22:15:57 +0000 (23:15 +0100)] 
[CALCITE-2652] SqlNode to SQL conversion fails if the join condition references a BOOLEAN column (Zoltan Haindrich)

Previously when a join ON condition have contained an exact reference it ended up with an exception.

Close apache/calcite#899

2 months ago[CALCITE-2657] In RexShuttle, use "RexCall.clone" instead of "new RexCall" (Chunwei...
chunwei.lcw [Wed, 7 Nov 2018 07:17:02 +0000 (15:17 +0800)] 
[CALCITE-2657] In RexShuttle, use "RexCall.clone" instead of "new RexCall" (Chunwei Lei)

Close apache/calcite#905

2 months ago[CALCITE-2224] Support WITHIN GROUP clause for aggregate functions (Hongze Zhang)
hongzezhang [Thu, 27 Sep 2018 09:55:02 +0000 (17:55 +0800)] 
[CALCITE-2224] Support WITHIN GROUP clause for aggregate functions (Hongze Zhang)

Close apache/calcite#871

2 months ago[CALCITE-2654] In RelBuilder, add a fluent API for building complex aggregate calls
Julian Hyde [Sun, 4 Nov 2018 02:59:11 +0000 (19:59 -0700)] 
[CALCITE-2654] In RelBuilder, add a fluent API for building complex aggregate calls

To interface AggCall in RelBuilder, add methods distinct(boolean),
filter(RexNode), approximate(boolean), alias(String). And simplify the
RelBuilder.aggregateCall method to just two arguments:
aggregateCall(op, operands). Thus you only specify the arguments that
are of interest. Similar changes to count, countStar, min, max, sum,
avg.

2 months ago[CALCITE-2655] Enable Travis to test against JDK 12
Kevin Risden [Tue, 6 Nov 2018 16:30:50 +0000 (11:30 -0500)] 
[CALCITE-2655] Enable Travis to test against JDK 12

Signed-off-by: Kevin Risden <krisden@apache.org>
2 months ago[CALCITE-2605] Support semi-join via EnumerableCorrelate (Ruben Quesada Lopez)
Vladimir Sitnikov [Tue, 6 Nov 2018 11:01:08 +0000 (14:01 +0300)] 
[CALCITE-2605] Support semi-join via EnumerableCorrelate (Ruben Quesada Lopez)

2 months ago[CALCITE-2605] Support left outer join via EnumerableCorrelate
Vladimir Sitnikov [Mon, 5 Nov 2018 13:34:54 +0000 (16:34 +0300)] 
[CALCITE-2605] Support left outer join via EnumerableCorrelate

Test by Ruben Quesada Lopez

closes #874
closes #901

2 months ago[CALCITE-2405] In Babel parser, make 400 reserved keywords including YEAR, SECOND...
Julian Hyde [Tue, 4 Sep 2018 23:54:05 +0000 (16:54 -0700)] 
[CALCITE-2405] In Babel parser, make 400 reserved keywords including YEAR, SECOND, DESC non-reserved

Command words (e.g. SELECT, UPDATE, EXPLAIN, ALTER), SQL clause names
(e.g. WHERE, ORDER, INNER but not BY), and keywords that start literals
(DATE, TIME, TIMESTAMP, INTERVAL) remain reserved.

In Planner, use the parser's conformance.

Avoid javac StackOverflowError by splitting up the NonReservedKeywords()
parser method into several parts.

Compatibility warning: If you have created your own sub-parser you must
copy nonReservedKeywords from core config.fmpp to your config.fmpp.
Previously the core non-reserved keywords were in a parser method
CommonNonReservedKeywords(), but that method has been removed.

Upgrade freemarker to 2.3.28.

2 months ago[CALCITE-2441] RelBuilder.scan should expand TranslatableTable and views
Julian Hyde [Thu, 25 Oct 2018 23:50:44 +0000 (16:50 -0700)] 
[CALCITE-2441] RelBuilder.scan should expand TranslatableTable and views

Add class ViewExpanders, which has utility methods for creating
ToRelContext and ViewExpander.