calcite.git
3 days ago[CALCITE-5269] Implement BigQuery TIME_TRUNC and TIMESTAMP_TRUNC functions main
TJ Banghart [Mon, 19 Sep 2022 21:15:38 +0000 (21:15 +0000)] 
[CALCITE-5269] Implement BigQuery TIME_TRUNC and TIMESTAMP_TRUNC functions

Make negative parser tests pass on Windows. (Previously, we
assumed that the error message would have Linux line
endings.)

Close apache/calcite#2913

3 days agoAdd tests for [CALCITE-5180] Implement BigQuery functions for DATE, TIME, TIMESTAMP...
Julian Hyde [Sat, 4 Jun 2022 22:30:28 +0000 (15:30 -0700)] 
Add tests for [CALCITE-5180] Implement BigQuery functions for DATE, TIME, TIMESTAMP, DATETIME

3 days ago[CALCITE-5291] Make lexical policy for BigQuery case-insensitive
TJ Banghart [Tue, 20 Sep 2022 03:47:57 +0000 (03:47 +0000)] 
[CALCITE-5291] Make lexical policy for BigQuery case-insensitive

Close apache/calcite#2914

3 days ago[CALCITE-5294] Prune the null-generating side of an outer join if it is empty
kasakrisz [Wed, 21 Sep 2022 06:38:36 +0000 (08:38 +0200)] 
[CALCITE-5294] Prune the null-generating side of an outer join if it is empty

Improve the join rules in PruneEmptyRules to remove a Join
if it generates null and one branch is empty.

Close apache/calcite#2916

Co-authored-by: Julian Hyde <jhyde@apache.org>
4 days ago[CALCITE-4972] Subfields of array columns containing structs are not qualified in...
Mark Grey [Fri, 7 Jan 2022 21:22:10 +0000 (16:22 -0500)] 
[CALCITE-4972] Subfields of array columns containing structs are not qualified in getFieldOrigins

Close apache/calcite#2683

5 days ago[CALCITE-5293] Support general set operators in PruneEmptyRules
kasakrisz [Tue, 20 Sep 2022 15:40:14 +0000 (17:40 +0200)] 
[CALCITE-5293] Support general set operators in PruneEmptyRules

Close apache/calcite#2915

7 days ago[CALCITE-5267] Remove unused variable 'newCasts' in AggregateCaseToFilterRule
wenzhuang.zwz [Tue, 6 Sep 2022 08:10:13 +0000 (16:10 +0800)] 
[CALCITE-5267] Remove unused variable 'newCasts' in AggregateCaseToFilterRule

We now use RelBuilder#convert to make casts.

This closes #2895

10 days ago[CALCITE-3129] Update site/README.md about how to release the site
Benchao Li [Thu, 15 Sep 2022 03:29:53 +0000 (11:29 +0800)] 
[CALCITE-3129] Update site/README.md about how to release the site

This closes #2907

11 days ago[CALCITE-5287] SQL reference page is missing from website
Stamatis Zampetakis [Fri, 16 Sep 2022 16:20:56 +0000 (18:20 +0200)] 
[CALCITE-5287] SQL reference page is missing from website

The newline at the beginning of reference.md page seems to be causing
a problem with Jekyll that ignores the .md file and fails to generate
the respective .html file.

2 weeks agoOops, missed a contributor
Julian Hyde [Sun, 11 Sep 2022 06:31:38 +0000 (23:31 -0700)] 
Oops, missed a contributor

2 weeks agoPrepare for next development iteration
Julian Hyde [Sat, 10 Sep 2022 07:49:04 +0000 (00:49 -0700)] 
Prepare for next development iteration

2 weeks ago[CALCITE-5275] Release Calcite 1.32.0 stage calcite-1.32.0 calcite-1.32.0-rc0
Julian Hyde [Thu, 8 Sep 2022 05:35:02 +0000 (22:35 -0700)] 
[CALCITE-5275] Release Calcite 1.32.0

2 weeks agoCosmetic changes to release notes
Julian Hyde [Thu, 8 Sep 2022 04:58:16 +0000 (21:58 -0700)] 
Cosmetic changes to release notes

2 weeks ago[CALCITE-5262] Add many spatial functions, including support for WKB (well-known...
Bertil Chapuis [Sat, 3 Sep 2022 12:02:53 +0000 (14:02 +0200)] 
[CALCITE-5262] Add many spatial functions, including support for WKB (well-known binary) and GeoJSON

Add functions:
 * ST_AsBinary
 * ST_AsEWKT and ST_GeomFromEWKT
 * ST_AsGeoJSON and ST_GeomFromGeoJSON
 * ST_AsGML and ST_GeomFromGML
 * ST_AsWKB and ST_GeomFromWKB
 * ST_Centroid
 * ST_ConvexHull
 * ST_CoordDim
 * ST_Covers
 * ST_Difference and ST_SymDifference
 * ST_Dimension and ST_BoundingCircle
 * ST_Expand
 * ST_Extent
 * ST_ExteriorRing and ST_InteriorRing
 * ST_Force2D and ST_Force3D
 * ST_GeometryN
 * ST_Intersection
 * ST_IsClosed, ST_IsRectangle, ST_IsRing, ST_IsSimple, ST_IsValid, ST_IsEmpty
 * ST_LineMerge
 * ST_MakeEllipse and ST_MakePolygon
 * ST_MakeValid
 * ST_MinimumDiameter
 * ST_MinimumRectangle
 * ST_NumGeometries
 * ST_NumInteriorRing and ST_NumInteriorRings
 * ST_NumPoints
 * ST_OctagonalEnvelope
 * ST_PointN
 * ST_PointOnSurface
 * ST_Polygonize
 * ST_PrecisionReducer
 * ST_Relate
 * ST_Rotate
 * ST_Scale
 * ST_Simplify and ST_SimplifyPreserveTopology
 * ST_Snap
 * ST_SRID
 * ST_StartPoint and ST_EndPoint
 * ST_ToMultiLine and ST_ToMultiSegments
 * ST_ToMultiPoint
 * ST_Translate
 * ST_XMax, ST_XMin, ST_YMax, ST_YMin, ST_ZMin, ST_ZMax

Improve documentation, aliases, and variable names.

Set the extractOnlyPolygonal option to true in ST_Polygonize.

Replace Esri by JTS in the acknowledgements.

Close apache/calcite#2893

2 weeks ago[CALCITE-5278] Upgrade Janino from 3.1.6 to 3.1.8
Julian Hyde [Thu, 8 Sep 2022 23:01:02 +0000 (16:01 -0700)] 
[CALCITE-5278] Upgrade Janino from 3.1.6 to 3.1.8

2 weeks ago[CALCITE-5270] JDBC adapter should not generate 'FILTER (WHERE)' in Firebolt dialect
TJ Banghart [Wed, 7 Sep 2022 00:13:39 +0000 (00:13 +0000)] 
[CALCITE-5270] JDBC adapter should not generate 'FILTER (WHERE)' in Firebolt dialect

Close apache/calcite#2896

2 weeks ago[CALCITE-5241] Implement CHAR function for MySQL and Spark, also JDBC '{fn CHAR(n)}'
xiejiajun [Sun, 21 Aug 2022 06:47:58 +0000 (14:47 +0800)] 
[CALCITE-5241] Implement CHAR function for MySQL and Spark, also JDBC '{fn CHAR(n)}'

Close apache/calcite#2878

2 weeks ago[CALCITE-5274] Improve DocumentBuilderFactory in DiffRepository test class by using...
rubenada [Thu, 8 Sep 2022 08:49:33 +0000 (09:49 +0100)] 
[CALCITE-5274] Improve DocumentBuilderFactory in DiffRepository test class by using secure features

2 weeks ago[CALCITE-5277] Make EnumerableRelImplementor stashedParameters order deterministic...
rubenada [Thu, 8 Sep 2022 09:29:05 +0000 (10:29 +0100)] 
[CALCITE-5277] Make EnumerableRelImplementor stashedParameters order deterministic to increase BINDABLE_CACHE hit rate

2 weeks ago[CALCITE-5251] Support SQL hint for Snapshot
lincoln.lil [Mon, 29 Aug 2022 08:46:41 +0000 (16:46 +0800)] 
[CALCITE-5251] Support SQL hint for Snapshot

2 weeks ago[CALCITE-5263] Improve XmlFunctions by using an XML DocumentBuilder
rubenada [Sat, 3 Sep 2022 18:25:25 +0000 (19:25 +0100)] 
[CALCITE-5263] Improve XmlFunctions by using an XML DocumentBuilder

Co-authored-by: David Handermann <exceptionfactory@apache.org>
2 weeks agoAdd tests for correlated CTEs
Julian Hyde [Wed, 7 Sep 2022 18:20:52 +0000 (11:20 -0700)] 
Add tests for correlated CTEs

3 weeks ago[CALCITE-4294] Use JTS and proj4j rather than ESRI as the underlying library for...
Bertil Chapuis [Sun, 21 Aug 2022 14:08:30 +0000 (16:08 +0200)] 
[CALCITE-4294] Use JTS and proj4j rather than ESRI as the underlying library for geospatial (ST_) functions

Prefix classes with SpatialType (ST) instead of Geo.

Adapt tests to JTS outputs. We now  round the floating point
values in geometries, because floating point values have
slightly different least-significant digits when run under
Java 8 and Java 11.

Add method TestUtil.roundGeom(String, int), to allow the
aforementioned rounding (Julian Hyde).

Unofficially add function ST_AsEWKT for use in tests; it
will be officially added (with tests and documentation)
in [CALCITE-5262].

Close apache/calcite#2879

3 weeks ago[CALCITE-5247] FilterJoinRule cannot simplify left join to inner join for `WHERE...
almansour [Sat, 27 Aug 2022 16:03:28 +0000 (19:03 +0300)] 
[CALCITE-5247] FilterJoinRule cannot simplify left join to inner join for `WHERE RHS.C1 IS NOT NULL OR RHS.C2 IS NOT NULL`

This closes #2887

4 weeks ago[CALCITE-4999] ARRAY, MULTISET functions should return a collection of scalars if...
dssysolyatin [Mon, 29 Aug 2022 09:13:50 +0000 (12:13 +0300)] 
[CALCITE-4999] ARRAY, MULTISET functions should return a collection of scalars if a sub-query returns 1 column

4 weeks ago[CALCITE-5243] `SELECT NULL AS C` causes NoSuchMethodException: java.sql.ResultSet...
wumou.wm [Sat, 27 Aug 2022 12:26:55 +0000 (20:26 +0800)] 
[CALCITE-5243] `SELECT NULL AS C` causes NoSuchMethodException: java.sql.ResultSet.getVoid(int)

This closes #2886

4 weeks ago[CALCITE-5126] Implicit column alias for single-column UNNEST should work with any... 2681/head
dssysolyatin [Mon, 2 May 2022 11:39:37 +0000 (14:39 +0300)] 
[CALCITE-5126] Implicit column alias for single-column UNNEST should work with any single-column UNNEST’s input

Close apache/calcite#2789

6 weeks ago[CALCITE-5201] Improve SemiJoinRule to match Join's right input which is unique for...
Benchao Li [Sun, 3 Jul 2022 13:19:16 +0000 (21:19 +0800)] 
[CALCITE-5201] Improve SemiJoinRule to match Join's right input which is unique for Join keys

This closes #2848

6 weeks agoRemove redundant `the` in java doc
strongduanmu [Mon, 8 Aug 2022 10:43:00 +0000 (18:43 +0800)] 
Remove redundant `the` in java doc

Close apache/calcite#2867

6 weeks ago[CALCITE-5232] Upgrade protobuf-java from 3.17.1 to 3.21.5
Julian Hyde [Thu, 11 Aug 2022 19:28:34 +0000 (12:28 -0700)] 
[CALCITE-5232] Upgrade protobuf-java from 3.17.1 to 3.21.5

6 weeks agoSite: Change sereda's role from Committer to PMC
Andrei Sereda [Thu, 11 Aug 2022 01:17:02 +0000 (21:17 -0400)] 
Site: Change sereda's role from Committer to PMC

6 weeks ago[CALCITE-5092] Update site/README.md about how to release the site
Benchao Li [Fri, 5 Aug 2022 00:42:52 +0000 (08:42 +0800)] 
[CALCITE-5092] Update site/README.md about how to release the site

This closes #2866

7 weeks ago[CALCITE-4223] Metadata handlers for TableScan should see whether the RelOptTable...
chunwei.lcw [Wed, 18 May 2022 01:41:29 +0000 (09:41 +0800)] 
[CALCITE-4223] Metadata handlers for TableScan should see whether the RelOptTable implements the handler

7 weeks ago[CALCITE-4802] Babel parser doesn't parse IF(condition, then, else) statements
xiejiajun [Sat, 18 Jun 2022 09:20:58 +0000 (17:20 +0800)] 
[CALCITE-4802] Babel parser doesn't parse IF(condition, then, else) statements

This closes #2835

7 weeks agoSite: Fix 1.31.0 release date to 2022-08-22 (was 2022-08-22)
Andrei Sereda [Fri, 5 Aug 2022 12:19:44 +0000 (14:19 +0200)] 
Site: Fix 1.31.0 release date to 2022-08-22 (was 2022-08-22)

7 weeks ago[CALCITE-5192] CodeGenerationBenchmark throws IllegalStateException
Benchao Li [Wed, 15 Jun 2022 14:49:06 +0000 (22:49 +0800)] 
[CALCITE-5192] CodeGenerationBenchmark throws IllegalStateException

This closes #2834

7 weeks ago[CALCITE-5178] Single column with ROW type generates wrong plan
Benchao Li [Sun, 26 Jun 2022 14:05:42 +0000 (22:05 +0800)] 
[CALCITE-5178] Single column with ROW type generates wrong plan

This closes #2843

7 weeks agoSite: fixing checkstyle violation for Calcite 1.31 release note
Alessandro Solimando [Wed, 3 Aug 2022 18:01:43 +0000 (20:01 +0200)] 
Site: fixing checkstyle violation for Calcite 1.31 release note

Newline missing at the end of the file

7 weeks agoPrepare for next development iteration
Andrei Sereda [Wed, 3 Aug 2022 16:41:07 +0000 (18:41 +0200)] 
Prepare for next development iteration

7 weeks ago[CALCITE-5096] Release announcement for Calcite 1.31
Andrei Sereda [Tue, 2 Aug 2022 16:09:54 +0000 (18:09 +0200)] 
[CALCITE-5096] Release announcement for Calcite 1.31

8 weeks ago[CALCITE-5096] Release Calcite 1.31.0 2858/head calcite-1.31.0 calcite-1.31.0-rc3
Andrei Sereda [Wed, 20 Jul 2022 01:04:38 +0000 (21:04 -0400)] 
[CALCITE-5096] Release Calcite 1.31.0

Update release history and other relevant documentation.

2 months ago[CALCITE-5096] Increase gradle build heap size from 512m to 1g
Andrei Sereda [Thu, 21 Jul 2022 04:36:15 +0000 (00:36 -0400)] 
[CALCITE-5096] Increase gradle build heap size from 512m to 1g

2 months ago[CALCITE-5221] Upgrade Avatica version to 1.22.0
Stamatis Zampetakis [Thu, 28 Jul 2022 12:21:48 +0000 (15:21 +0300)] 
[CALCITE-5221] Upgrade Avatica version to 1.22.0

2 months agoSite: Add Jing Zhang as committer
Jing Zhang [Mon, 18 Jul 2022 13:25:52 +0000 (21:25 +0800)] 
Site: Add Jing Zhang as committer

2 months ago[CALCITE-4865] Allow table functions to be polymorphic
Jing Zhang [Thu, 11 Nov 2021 13:25:19 +0000 (21:25 +0800)] 
[CALCITE-4865] Allow table functions to be polymorphic

2 months agoSite: Outline process for becoming Calcite committer by request
Stamatis Zampetakis [Tue, 5 Jul 2022 21:26:18 +0000 (23:26 +0200)] 
Site: Outline process for becoming Calcite committer by request

2 months ago[CALCITE-5194] Cannot parse parenthesized UNION in FROM
Julian Hyde [Thu, 23 Jun 2022 00:26:56 +0000 (17:26 -0700)] 
[CALCITE-5194] Cannot parse parenthesized UNION in FROM

2 months agoRefactor parser
Julian Hyde [Fri, 8 Jul 2022 19:30:33 +0000 (12:30 -0700)] 
Refactor parser

This commit does not change functionality. Some method
signatures have changed, which might affect derived parsers.
We also fix a few lint warnings outside the parser.

Here are the major refactorings:

1. Remove unused imports and variables;
2. Make variables 'final' wherever possible;
2. Remove unused initializers;
4. Convert optional blocks to mandatory blocks. For example,

  [ e = X() ]

becomes

  ( e = X() | { e = null; } )

and now we can remove e's initializer and make it 'final'.

5. Deprecate the 'startList' method. Previously you would
use 'startList' to initialize the list when adding the
first element:

  List<SqlNode> list;
  ...
  list = startList(e)

Now you initialize the list when it is declared:

  final List<SqlNode> list = new ArrayList<SqlNode>();
  ...
  list.add(e);

This is a bit more work if the list is never used. But it
makes the code to add the first element the same as the code
to add subsequent elements.

6. If parser methods are used to build lists, this change
refactors them to pass the list as an argument. For
example,

  SqlNode OrderItem() : ...

  e = OrderItem() { list.add(e); }
  ( <COMMA> e = OrderItem() { list.add(e); } )*

is now

  void AddOrderItem(List<SqlNode> list) : ...

  AddOrderItem(list) ( <COMMA> AddOrderItem(list) )*

This change adds a 'Add' prefix to existing methods of this
style.

7. Remove an obsolete resource that used to be used by the
parser.

2 months ago[CALCITE-5206] Parser allows MERGE with mismatched parentheses
Julian Hyde [Sun, 10 Jul 2022 01:34:55 +0000 (18:34 -0700)] 
[CALCITE-5206] Parser allows MERGE with mismatched parentheses

The SQL parser allows invalid MERGE statements with mismatched
parentheses. For example, the following invalid statement is
treated as valid but is missing a trailing ')':

  MERGE INTO emps AS e
  USING temps AS t ON e.empno = t.empno
  WHEN NOT MATCHED
  THEN INSERT (a, b) (VALUES (1, 2);

Similarly if there is a '(' before VALUES but not after.

2 months agoSite: Add Benchao Li as committer
Benchao Li [Tue, 5 Jul 2022 09:10:13 +0000 (17:10 +0800)] 
Site: Add Benchao Li as committer

2 months ago[CALCITE-4746] PIVOT with aggregate and no without alias fails in Babel parser
xiejiajun [Sat, 25 Jun 2022 09:59:02 +0000 (17:59 +0800)] 
[CALCITE-4746] PIVOT with aggregate and no without alias fails in Babel parser

The cause is that Babel sees the upcoming FOR, which is a
reserved keyword in Calcite's core parser but non-reserved
in Babel, and wrongly treats it as an alias.

Close apache/calcite#2842

3 months ago[CALCITE-5045] Alias within GroupingSets throws type mis-match exception [CALCITE...
hannerwang [Fri, 24 Jun 2022 03:38:44 +0000 (11:38 +0800)] 
[CALCITE-5045] Alias within GroupingSets throws type mis-match exception [CALCITE-5145] CASE statement within GROUPING SETS throws type mis-match exception

Co-authored-by: yingyuwang <yingyuwang@users.noreply.github.com>
3 months ago[CALCITE-5195] ArrayIndexOutOfBoundsException when inferring more equal conditions...
chunwei.lcw [Wed, 22 Jun 2022 03:41:13 +0000 (11:41 +0800)] 
[CALCITE-5195] ArrayIndexOutOfBoundsException when inferring more equal conditions from join condition for semi join

3 months ago[CALCITE-5196] Bump apiguardian to 1.1.2
Sergey Nuyanzin [Thu, 23 Jun 2022 15:50:27 +0000 (17:50 +0200)] 
[CALCITE-5196] Bump apiguardian to 1.1.2

3 months ago[CALCITE-5013] Unparse SqlSetOperator should be retained parentheses when generating...
xiejiajun [Sat, 19 Feb 2022 07:12:04 +0000 (15:12 +0800)] 
[CALCITE-5013] Unparse SqlSetOperator should be retained parentheses when generating SQL for UNION ... LIMIT

Co-authored-by: Julian Hyde <jhyde@apache.org>
3 months ago[CALCITE-5177] Query loses hint after decorrelation (minor follow-up)
rubenada [Mon, 13 Jun 2022 08:57:55 +0000 (09:57 +0100)] 
[CALCITE-5177] Query loses hint after decorrelation (minor follow-up)

3 months ago[CALCITE-4897] Implicit type conversion is not complete for set operation in DML
xiejiajun [Sat, 20 Nov 2021 08:37:58 +0000 (16:37 +0800)] 
[CALCITE-4897] Implicit type conversion is not complete for set operation in DML

3 months ago[CALCITE-5157] Query that applies dot operator (field access) to parenthesized expres...
Viliam Durina [Tue, 17 May 2022 17:51:11 +0000 (19:51 +0200)] 
[CALCITE-5157] Query that applies dot operator (field access) to parenthesized expression throws ClassCastException

For example,
  SELECT (item).name
  FROM on_hand
throws ClassCastException in checkRollUp while
  SELECT item.name
  FROM on_hand
succeeds.

Close apache/calcite#2808

3 months agoRemove other instance of JsonTable
Daniel Henneberger [Tue, 14 Jun 2022 19:14:47 +0000 (12:14 -0700)] 
Remove other instance of JsonTable

Signed-off-by: Daniel Henneberger <git@danielhenneberger.com>
3 months agoRemove unreachable condition in CsvTableScan
henneberger [Tue, 14 Jun 2022 19:03:39 +0000 (12:03 -0700)] 
Remove unreachable condition in CsvTableScan

This removes an unreachable condition in CsvTableScan when checking if a table is a JsonTable. The table object can only take the form of a RelOptTable and not a Table.

3 months ago[CALCITE-5191] Allow ORDER BY alias in BigQuery
wenrui [Tue, 14 Jun 2022 21:50:49 +0000 (14:50 -0700)] 
[CALCITE-5191] Allow ORDER BY alias in BigQuery

Close apache/calcite#2833

3 months ago[CALCITE-5134] Queries with subquery inside select list does not work if subquery...
Benchao Li [Thu, 5 May 2022 14:00:32 +0000 (22:00 +0800)] 
[CALCITE-5134] Queries with subquery inside select list does not work if subquery uses table from left join

3 months ago[CALCITE-5169] 'xx < 1 OR xx > 1' cannot be simplified to 'xx <> 1'
Benchao Li [Sun, 29 May 2022 07:39:51 +0000 (15:39 +0800)] 
[CALCITE-5169] 'xx < 1 OR xx > 1' cannot be simplified to 'xx <> 1'

Close apache/calcite#2821

3 months ago[CALCITE-4448] Use TableMacro user-defined table functions with QueryableTable
Volodymyr Vysotskyi [Sun, 27 Dec 2020 21:01:49 +0000 (23:01 +0200)] 
[CALCITE-4448] Use TableMacro user-defined table functions with QueryableTable

3 months ago[CALCITE-5177] Query loses hint after decorrelation
rubenada [Tue, 7 Jun 2022 10:18:45 +0000 (11:18 +0100)] 
[CALCITE-5177] Query loses hint after decorrelation

3 months ago[CALCITE-5143] Allow custom time unit abbreviations in FLOOR, CEIL, EXTRACT, DATE_PAR...
xiejiajun [Thu, 12 May 2022 01:13:58 +0000 (09:13 +0800)] 
[CALCITE-5143] Allow custom time unit abbreviations in FLOOR, CEIL, EXTRACT, DATE_PART, DATEADD, DATEDIFF and similar functions

Time unit abbreviations are specified in
SqlParser.Config.timeUnitCodes().

Since [CALCITE-2496], EXTRACT supports MICROSECOND and
NANOSECOND by default but FLOOR and CEIL do not. With this
change, you could configure FLOOR and CEIL to also support
those units.

Close apache/calcite#2807

3 months ago[CALCITE-5179] In RelToSqlConverter, AssertionError for values with more than two...
xiejiajun [Sat, 4 Jun 2022 08:01:41 +0000 (16:01 +0800)] 
[CALCITE-5179] In RelToSqlConverter, AssertionError for values with more than two items when SqlDialect#supportsAliasedValues is false

3 months agoFix typo in comments
chunwei.lcw [Mon, 23 May 2022 02:18:44 +0000 (10:18 +0800)] 
Fix typo in comments

3 months ago[CALCITE-4907] JDBC adapter cannot push down join ON TRUE (cartesian product)
Francesco Gini [Sun, 28 Nov 2021 18:37:05 +0000 (18:37 +0000)] 
[CALCITE-4907] JDBC adapter cannot push down join ON TRUE (cartesian product)

Close apache/calcite#2620

3 months ago[CALCITE-5147] Allow DATE, TIME, TIMESTAMP, INTERVAL literals in BigQuery dialect
wenrui [Tue, 31 May 2022 05:50:33 +0000 (22:50 -0700)] 
[CALCITE-5147] Allow DATE, TIME, TIMESTAMP, INTERVAL literals in BigQuery dialect

Before this change, the expression

  DATE '2018-02-17'

fails to parse in BigQuery dialect because the parser
requires a <QUOTED_STRING> token and actually sees a
<BIG_QUERY_QUOTED_STRING> token. Similarly TIME, TIMESTAMP,
LITERAL literals. After this change, the above single-quoted
form succeeds, as does the double-quoted form like this:

  DATE "2018-02-17"

In SqlParserUtil, the methods parseDateLiteral,
parseTimeLiteral, parseTimestampLiteral and
parseIntervalLiteral expected a quoted string as an argument
(e.g. "'2018-02-17'") and now expect just the value (e.g.
"2018-02-17'"). Callers should now call parseString on the
argument first.

Close apache/calcite#2823

3 months ago[CALCITE-5086] SQL parser should allow OFFSET to occur before LIMIT
hannerwang [Thu, 7 Apr 2022 11:24:05 +0000 (19:24 +0800)] 
[CALCITE-5086] SQL parser should allow OFFSET to occur before LIMIT

Syntax is enabled if SqlConformance.isOffsetLimitAllowed() returns true.

Refactor parser:
 * Rename startCount to offsetFetch (based on the standard
   names of the clauses). Extract FETCH into its own method.
 * Disallow FETCH if parser has already seen LIMIT.

Close apache/calcite#2768

3 months ago[CALCITE-4913] Deduplicate correlated variables in SELECT clause
korlov42 [Fri, 3 Jun 2022 08:43:05 +0000 (11:43 +0300)] 
[CALCITE-4913] Deduplicate correlated variables in SELECT clause

Partial revert of deduplication in LogicalTableFunctionScan
(CALCITE-4673) since the deduplication in Project is more general and
covers the previous use-case as well.

Close apache/calcite#2825

3 months ago[CALCITE-5150] Parser should parse subquery with order by inside array constructor
dssysolyatin [Thu, 12 May 2022 08:25:37 +0000 (11:25 +0300)] 
[CALCITE-5150] Parser should parse subquery with order by inside array constructor

3 months ago[CALCITE-35] Support parsing parenthesized joins
Julian Hyde [Mon, 16 May 2022 03:13:27 +0000 (20:13 -0700)] 
[CALCITE-35] Support parsing parenthesized joins

Allow comma only at top level in FROM clause.
Add new join operator, COMMA-JOIN, with slightly lower
precedence than JOIN, to that unparsing works correctly.

Move test case from JdbcTest to join.iq.

Includes changes from PR #1204, authored by
Muhammad Gelbana <m.gelbana@gmail.com>

Close apache/calcite#1204
Close apache/calcite#2820

Co-authored-by: Muhammad Gelbana <m.gelbana@gmail.com>
3 months ago[CALCITE-5171] NATURAL join and USING should fail if join columns are not unique
Julian Hyde [Sun, 29 May 2022 23:45:23 +0000 (16:45 -0700)] 
[CALCITE-5171] NATURAL join and USING should fail if join columns are not unique

3 months ago[CALCITE-5153] Create an immutable version of ListSqlOperatorTable
Julian Hyde [Fri, 13 May 2022 01:47:57 +0000 (18:47 -0700)] 
[CALCITE-5153] Create an immutable version of ListSqlOperatorTable

Create an immutable version of class ListSqlOperatorTable,
to be created via SqlOperatorTables.of.

class ListSqlOperatorTable still exists but its constructors
and add(SqlOperator) methods are deprecated. We hope that
people will create immutable operator tables most of the time.

Refactor MockSqlOperatorTable to be immutable. Methods that
mutate the table, such as addRamp, are replaced by methods
that return a copy.

When creating a ChainedSqlOperatorTable, flatten constituent
tables that are a ChainedSqlOperatorTable, and remove
constituent tables that are immutable and empty.

3 months ago[CALCITE-5170] Assertion error on range distribution creation
rkondakov [Sun, 29 May 2022 09:31:30 +0000 (13:31 +0400)] 
[CALCITE-5170] Assertion error on range distribution creation

3 months ago[CALCITE-5162] RelMdUniqueKeys can return more precise unique keys for Aggregate
chunwei.lcw [Fri, 20 May 2022 12:15:39 +0000 (20:15 +0800)] 
[CALCITE-5162] RelMdUniqueKeys can return more precise unique keys for Aggregate

4 months agoSite: Add Chunwei Lei and Vladimir Ozerov as PMC members
Francis Chuang [Sat, 28 May 2022 06:44:26 +0000 (16:44 +1000)] 
Site: Add Chunwei Lei and Vladimir Ozerov as PMC members

4 months ago[CALCITE-5073] JoinConditionPushRule cannot infer 'LHS.C1 = LHS.C2' from 'LHS.C1...
Benchao Li [Fri, 1 Apr 2022 10:12:27 +0000 (18:12 +0800)] 
[CALCITE-5073] JoinConditionPushRule cannot infer 'LHS.C1 = LHS.C2' from 'LHS.C1 = RHS.C1 AND LHS.C2 = RHS.C1'

Cosmetic fix-ups by Chunwei Lei.

Close apache/calcite#2761

4 months ago[CALCITE-5163] MysqlSqlDialect support to unparse LISTAGG aggregate function
xurenhe [Fri, 20 May 2022 08:37:04 +0000 (16:37 +0800)] 
[CALCITE-5163] MysqlSqlDialect support to unparse LISTAGG aggregate function

4 months ago[CALCITE-5166] Method accept(RelShuttle) is not overridden in LogicalCalc and Logical...
rkondakov [Sun, 22 May 2022 15:14:12 +0000 (19:14 +0400)] 
[CALCITE-5166] Method accept(RelShuttle) is not overridden in LogicalCalc and LogicalTableModify

4 months ago[CALCITE-5118] SqlDatePartFunction#rewriteCall should check operands length
Benchao Li [Wed, 27 Apr 2022 14:24:04 +0000 (22:24 +0800)] 
[CALCITE-5118] SqlDatePartFunction#rewriteCall should check operands length

4 months ago[CALCITE-5165] Improve javadoc
zhangyue [Sun, 22 May 2022 14:23:03 +0000 (22:23 +0800)] 
[CALCITE-5165] Improve javadoc

Close apache/calcite#2814

4 months ago[CALCITE-3890] Derive IS NOT NULL filter for the inputs of inner join
chunwei.lcw [Mon, 9 May 2022 08:33:12 +0000 (16:33 +0800)] 
[CALCITE-3890] Derive IS NOT NULL filter for the inputs of inner join

4 months ago[CALCITE-5089] Allow GROUP BY ALL or DISTINCT set quantifier on GROUPING SETS
hannerwang [Wed, 13 Apr 2022 07:01:39 +0000 (15:01 +0800)] 
[CALCITE-5089] Allow GROUP BY ALL or DISTINCT set quantifier on GROUPING SETS

Close apache/calcite#2771

4 months ago[CALCITE-5061] Improve recursive application of the field trimming
rubenada [Fri, 13 May 2022 14:23:34 +0000 (15:23 +0100)] 
[CALCITE-5061] Improve recursive application of the field trimming

4 months ago[CALCITE-5149] Refine RelMdColumnUniqueness for Aggregate by considering intersect...
chunwei.lcw [Thu, 12 May 2022 09:43:07 +0000 (17:43 +0800)] 
[CALCITE-5149] Refine RelMdColumnUniqueness for Aggregate by considering intersect keys between target keys and group keys

4 months ago[CALCITE-5137] EnumerableUncollect throws NPE if input has ((List) null)
dssysolyatin [Sat, 7 May 2022 19:20:09 +0000 (22:20 +0300)] 
[CALCITE-5137] EnumerableUncollect throws NPE if input has ((List) null)

4 months ago[CALCITE-5142] Upgrade Calcite to Avatica 1.21.0
Benchao Li [Sun, 8 May 2022 12:41:30 +0000 (20:41 +0800)] 
[CALCITE-5142] Upgrade Calcite to Avatica 1.21.0

4 months ago[CALCITE-5081] Group keys of Aggregate are wrongly changed during decorrelation
Benchao Li [Sun, 24 Apr 2022 00:31:30 +0000 (08:31 +0800)] 
[CALCITE-5081] Group keys of Aggregate are wrongly changed during decorrelation

4 months ago[CALCITE-5138] Join on condition generates wrong plan when the condition is sub-query
NobiGo [Sun, 8 May 2022 02:45:01 +0000 (10:45 +0800)] 
[CALCITE-5138] Join on condition generates wrong plan when the condition is sub-query

4 months ago[CALCITE-5140] Spark, Piglet tests fail in GitHub CI with OpenJ9
Benchao Li [Wed, 11 May 2022 14:10:07 +0000 (22:10 +0800)] 
[CALCITE-5140] Spark, Piglet tests fail in GitHub CI with OpenJ9

Close apache/calcite#2802

4 months ago[CALCITE-5125] Extend "||" operator to work with arrays
dssysolyatin [Fri, 29 Apr 2022 13:24:40 +0000 (16:24 +0300)] 
[CALCITE-5125] Extend "||" operator to work with arrays

Close apache/calcite#2787

4 months ago[CALCITE-5131] Remove redundant type cast
chunwei.lcw [Sat, 7 May 2022 01:46:42 +0000 (09:46 +0800)] 
[CALCITE-5131] Remove redundant type cast

4 months ago[CALCITE-5139] Improve Join print plan to add the CorrelationId info
NobiGo [Sun, 8 May 2022 03:28:07 +0000 (11:28 +0800)] 
[CALCITE-5139] Improve Join print plan to add the CorrelationId info

4 months ago[CALCITE-5095] Support Java 18 and Guava 31.1-jre
Benchao Li [Mon, 18 Apr 2022 03:33:11 +0000 (11:33 +0800)] 
[CALCITE-5095] Support Java 18 and Guava 31.1-jre

Update Travis URL.

Close apache/calcite#2773

4 months ago[CALCITE-5111] jekyll-cache directory should be ignored by git
Benchao Li [Mon, 25 Apr 2022 14:33:24 +0000 (22:33 +0800)] 
[CALCITE-5111] jekyll-cache directory should be ignored by git

4 months agoRemove useless explicit type cast when using SqlValidator
chunwei.lcw [Fri, 29 Apr 2022 02:51:10 +0000 (10:51 +0800)] 
Remove useless explicit type cast when using SqlValidator

4 months ago[CALCITE-5003] MergeUnion on types with different collators produces wrong result
rubenada [Fri, 29 Apr 2022 08:41:10 +0000 (09:41 +0100)] 
[CALCITE-5003] MergeUnion on types with different collators produces wrong result