History
For a full list of releases, see github. Downloads are available on the downloads page.
1.41.0 / 2025-11-01
This release comes 5 months after 1.40.0, contains contributions from 41 contributors, and resolves 155 issues.
Highlights include support for several UNSIGNED types in the type system,
get functional dependency metadata in RelMetadataQuery,
supporting various join types on DPhyp join reorder algorithm,
a new API for finding common relational sub-expressions,
and new bitwise operators. Regarding this last feature, it can be possible for a certain bitwise operator and its
corresponding already existing SQL function to have discrepancies on operand type checker and return type inference when
unsigned parameters are involved; this shall be aligned in future versions.
Contributors to this release: Aleksey Plekhanov, Alessandro Solimando, Arnaud Jegou, Chris Dennis, Claude Brisson, Denys Kuzmenko, Dmitry Sysolyatin, Gian Merlino, Guillaume Massé, Ian Bertolacci, Istvan Toth, iwanttobepowerful, Julian Hyde, Juntao Zhang, Konstantin Orlov, lincoln-lil, liuyuhanalex, Lucas Brenner, Michael Mior, Michal Stutzmann, Mihai Budiu, Niels Pardon, Richard Antal, Ruben Quesada Lopez (release manager), Sergey Nuyanzin, Silun Dong, Soumyakanti Das, Stamatis Zampetakis, suibianwanwan, TJ Banghart, Wang Zhao, wuxiaojun, Xiaochen Zhou, xiaojun, Xiong Duan, Xiong Tenghui, xuzifu666, Yu Xu, Zhe Hu, Zhen Chen, Zhengqiang Duan.
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 23; Guava versions 21.0 to 33.4.8-jre; other software versions as specified in gradle.properties.
Breaking Changes
-
[CALCITE-7029] This feature introduced
RexNodeAndFieldIndex(a new subclass ofRexVariable) and its correspondingvisitNodeAndFieldIndexmethod in theRexVisitorandRexBiVisitorinterfaces; so any implementations of these interfaces will have to implement this method. -
[CALCITE-7125] This change brings back the original behavior of
CoreRules#INTERSECT_TO_DISTINCTrule, which had been altered in 1.40.0 due to CALCITE-6893 (it removed the partial aggregate pushdown on the union branches). The CALCITE-6893 behavior can still be obtained with the new version of the ruleCoreRules#INTERSECT_TO_DISTINCT_NO_AGGREGATE_PUSHDOWN. -
[CALCITE-5716] Prior to this change,
SubQueryRemoveRulewas able to process a plan created withRelBuilderAPI containing aFilterwith aRexSubQuerywith a correlated variable which was (incorrectly) not declared on thevariablesSetof theFilter. This will be no longer the case and, in this type of scenario, theFilteroperator must declare the correlated variables used on the sub-queries inside its condition in order to be properly handled bySubQueryRemoveRule.
New features
- [CALCITE-1466] Support for
UNSIGNEDtypes ofTINYINT,SMALLINT,INT,BIGINTin the type system - [CALCITE-7111] Add an API for finding common relational sub-expressions
- [CALCITE-5913] Support to get functional dependency metadata in
RelMetadataQuery - [CALCITE-7029] Support DPhyp to handle various join types
- [CALCITE-7189] Support MySQL-style non-standard
GROUP BY - [CALCITE-7184] Support for bitwise
AND(&) operator in SQL - [CALCITE-6731] Support bitwise
XOR(^) operator in SQL - [CALCITE-7109] Support bitwise leftshift (
<<) operator and implementLEFT_SHIFTfunction in SQL - [CALCITE-7190]
FETCHandOFFSETinSortMergeRuleonly supportsBIGINT - [CALCITE-7181]
FETCHinSortRemoveRedundantRuledo not supportBIGINT - [CALCITE-7178]
FETCHandOFFSETinEnumerableMergeUnionRuledo not supportBIGINT - [CALCITE-7176]
FETCHandOFFSETinSortMergeRuledo not supportBIGINT - [CALCITE-7156]
OFFSETandFETCHinEnumerableLimitneed to supportBIGINT - [CALCITE-7160] Simplify
AND/ORwithDISTINCTpredicates toSEARCH - [CALCITE-7140] Improve constant reduction of expressions containing
SqlRowOperator - [CALCITE-7116] Optimize queries with
GROUPING SETSby converting them into equivalentUNION ALLofGROUP BYoperations - [CALCITE-7104] Remove duplicate sort keys
- [CALCITE-7095] Allow
MAP<VARIANT, X>to be indexed by any type of key - [CALCITE-7090] Support
LogicalRepeatUnioninRelHomogeneousShuttle - [CALCITE-7089] Implement a rule for converting a
RIGHT JOINto aLEFT JOIN - [CALCITE-7077] Implement a rule to rewrite
FULL JOINasLEFT JOINandRIGHT JOIN - [CALCITE-7086] Implement a rule that performs the inverse operation of
AggregateCaseToFilterRule - [CALCITE-7068] ElasticSearch adapter support
LIKEoperator - [CALCITE-7042] Eliminate nested
TRIMcalls, exploiting the fact thatTRIMis idempotent - [CALCITE-6763] Optimize logic to select the tiles with the fewest rows
- [CALCITE-5094] Calcite JDBC Adapter and Avatica should support MySQL
UNSIGNEDtypes ofTINYINT,SMALLINT,INT,BIGINT - [CALCITE-7080] Support unparse when operator is
UPDATE - [CALCITE-7021] Support parse
CAST('1' AS INTERVAL) - [CALCITE-7249] Support unsigned types in
RelMdSize - [CALCITE-1440] Add Combine
RelNodefor converting multiple SQL statements to unifiedRelNodeTree
Dependency version upgrade
- [CALCITE-7183] Upgrade Avatica to 1.27.0
- [CALCITE-7175] Update Jackson from 2.15.0 to 2.18.4.1
- [CALCITE-7177] Upgrade Guava from 33.4.0-jre to 33.4.8-jre
- [CALCITE-7180] Upgrade Github actions versions
- [CALCITE-7163] Upgrade Sonar Gradle Plugin to version 6.3.1.5724
- [CALCITE-7108] Upgrade aggdesigner-algorithm from 6.0 to 6.1
- [CALCITE-7098] Update json-smart from 2.3 to 2.6.0
- [CALCITE-7097] Update commons-lang to 3.18.0
- Bump rexml from 3.4.1 to 3.4.2 in /site
- Bump nokogiri from 1.18.8 to 1.18.9 in /site
Bug-fixes, API changes and minor enhancements
- [CALCITE-7194] Simplify comparisons between function calls and literals to
SEARCH - [CALCITE-7240] Handle
SEARCHin DateRangeRules - [CALCITE-7228] Validator rejects legal
ASOF JOINprogram - [CALCITE-7034]
IllegalArgumentExceptionwhen correlate subQuery inONclause and use rightside columns - [CALCITE-7070]
FILTER_REDUCE_EXPRESSIONScrashes on expressionBETWEEN ( NULL) AND X - [CALCITE-7201]
ClassCastExceptioninRexInterpreter#searchwith differentNUMERICvalues - [CALCITE-7238] Query that creates a
ROWvalue triggers an assertion failure inSqlToRelConverter - [CALCITE-6028] Join on with more than 20 in conditions will report a null pointer error
- [CALCITE-7230] Compiler rejects comparisons between
NULLand aROWvalue - [CALCITE-7225] Comparing
ROWvalues with different lengths causes anIndexOutOfBoudsException - [CALCITE-7222]
SortRemoveDuplicateKeysRulemiss fetch and offset information - [CALCITE-7010] The well-known count bug
- [CALCITE-5743] Query gives incorrect result when
COUNTappears in the correlated subquery select list - [CALCITE-5421]
SqlToRelConvertershould populatecorrelateIdfor join with correlated query inHAVINGcondition - [CALCITE-5199] The
leastRestrictiveStructuredTypemethod should reserve theStructKindinstead of override it toFULLY_QUALIFIED - [CALCITE-5568] Decorrelate will fail if the
RelNodetree hasLogicalValues - [CALCITE-7231] Validator crashes with
AssertionFailureon query withROWandIN - [CALCITE-7220]
RelToSqlConverterthrows exception forUPDATEwith self-referencing column inSET - [CALCITE-7218]
ArrowSetneeds to maintain a minimal set of functional dependencies - [CALCITE-7217]
LATERALis lost after validation - [CALCITE-7216]
SqlOperator.inferReturnTypethrows the wrong exception on error - [CALCITE-7212]
VariablesSetofProjectis lost duringRelStructuredTypeFlattenerprocessing - [CALCITE-7210]
BINARYliteral values may not match their type - [CALCITE-7195]
COALESCEtype inference rejects legal arguments - [CALCITE-7193] In an aggregation validator treats lambda variable names as column names
- [CALCITE-7192]
AggregateReduceFunctionsRulelostFILTERcondition inSTDDEV/VARfunction decomposition - [CALCITE-7191] Hypergraph creation with incorrect hyperedges
- [CALCITE-7186] Add mapping from
Character[]toVARCHARin JavaUDF - [CALCITE-7159]
LogicalAsofJoindeepEqualscan throw for legal expressions - [CALCITE-7158]
NULLcannot be cast toUUID - [CALCITE-7157] PostgreSQL does not support string literal in
ORDER BYclause - [CALCITE-7154] When the
offsetorlimitof aSORToperation is of typeBIGINTrow count calculation overflows - [CALCITE-4617] Wrong
offsetwhenSortJoinTransposeRulepushes aSortwith anoffset - [CALCITE-7149] Constant
TIMESTAMPADDexpression causes assertion failure in validator - [CALCITE-7147] Comparison of
INTEGERandBOOLEANproduces strange results - [CALCITE-7146]
TIMESTAMPDIFFaccepts arguments with mismatched types - [CALCITE-7144]
LIMITshould not be pushed through projections containing window functions - [CALCITE-7135]
SqlToRelConverterthrowsAssertionErroronARRAYsubquery order by a field that is not present on the final projection - [CALCITE-7134] Incorrect type inference for some aggregate functions when groupSets contains
{} - [CALCITE-7132] Inconsistency with type coercion and character types
- [CALCITE-7131]
SqlImplementor.toSqldoes not handleGeometryliterals - [CALCITE-7128]
SqlImplementor.toSqldoes not handleUUIDliterals - [CALCITE-7127]
RelToSqlConvertercorrupts condition inside an anti-join withWHERE NOT EXISTS - [CALCITE-7126] The calculation result of grouping function is wrong
- [CALCITE-7125] Impossible to get a plan with partial aggregate push-down via
IntersectToDistinctRule - [CALCITE-7118] Rex-to-Lix Translation fails to correctly truncate/pad
RexDynamicParamvalues - [CALCITE-7114] Invalid unparse for cast to array type in Spark
- [CALCITE-7113]
RelJsoncannot serializeRexLambda - [CALCITE-7112] Correlation variable in
HAVINGclause causesUnsupportedOperationExceptionin RelToSql conversion - [CALCITE-7105]
ARRAY_CONCATshould only accept arguments with typeARRAY - [CALCITE-7102] Should return Presto
SqlConformancewhenDatabaseProductis Presto - [CALCITE-7096] Invalid unparse for
EXTRACTin StarRocks/Doris - [CALCITE-7073] If the Java return type of a
UDFisByteString, Calcite should deduce that the SQL type isVARBINARY - [CALCITE-5583] JDBC adapter does not generate
SELECT *when duplicate field names - [CALCITE-7074]
IN-list that includesNULLconverted toValuesreturn wrong result - [CALCITE-7076]
IN-list that includesNULLconverted toValuesthrows exception when there is a non-null column being compared with aNULLvalue - [CALCITE-7094] Using a type alias as a constructor function causes a validator assertion failure
- [CALCITE-7088] Multiple consecutive
%in the string matched byLIKEshould simplify to a single% - [CALCITE-7083]
RelMdDistinctRowCountaggregates implementation problems - [CALCITE-7081] Invalid unparse for cast to nested type in ClickHouse
- [CALCITE-7079] MongoDB Adapter unable to translate multiple
NOT EQUALSexpressions combined withAND - [CALCITE-7070]
FILTER_REDUCE_EXPRESSIONScrashes on expressionBETWEEN ( NULL) AND X - [CALCITE-7069] Invalid unparse for
INT UNSIGNEDandBIGINT UNSIGNEDin MysqlSqlDialect - [CALCITE-7067] Maximum precision of
UNSIGNED BIGINTtype in MysqlSqlDialect should be 20 - [CALCITE-7066]
UNSIGNEDtypes are not supported by databases like Oracle, SQL Server - [CALCITE-7065]
CoreRules.PROJECT_REDUCE_EXPRESSIONScrashes when applied to a lambda - [CALCITE-7009]
AssertionErrorwhen converting query containing multiple correlated subqueries referencing different tables inFROM - [CALCITE-7064] Test introduced in
CALCITE-7009breaks the build for main - [CALCITE-7062] Row type of SetOp may ignore a column’s nullability
- [CALCITE-7061]
RelMdSizedoes not handle nestedARRAY/MAPconstructor calls - [CALCITE-7058] Decorrelator may produce different column names
- [CALCITE-7056] Convert
RelNodeto Sql failed when theRelNodeincludes quantify operators - [CALCITE-7055] Invalid unparse for cast to array type in StarRocks
- [CALCITE-7054] Runtime conversion of
DECIMAL MULTISETtoINT MULTISETorDECIMAL ARRAYtoINT MULTISETfails with aClassCastException - [CALCITE-7052] When conformance specifies
isGroupbyAlias = truethe validator rejects legal queries - [CALCITE-7051]
NATURAL JOINandJOINwithUSINGdoes not match the appropriate columns whencaseSensitiveisfalse - [CALCITE-7072] Validator should not insert aliases on subexpressions
- [CALCITE-7162]
AggregateMergeRuletype mismatch onMIN/MAX - [CALCITE-4756] When subquery include
NULLvalue, Calcite should return the right result - [CALCITE-7050] Invalid unparse for
FULL JOINin MySQLDialect - [CALCITE-7048] Derived types with
FLOATtype arguments are handled incorrectly in Presto - [CALCITE-7047] Improve Volcano planner selection of sort conversion rules
- [CALCITE-7044] Add internal operator
CAST NOT NULLto enhance rewriteCOALESCEoperator - [CALCITE-7233]
SqlToRelConverterthrowsUnsupportedOperationExceptionafter the introduction of the internalCAST_NOT_NULLoperator - [CALCITE-7043] Type inferred for
SqlItemOperatorhas incorrect nullability - [CALCITE-7032] Simplify
NULL > ALL (ARRAY[1,2,NULL])toNULL - [CALCITE-7024] Decorrelator does not always produce a query with the same type signature
- [CALCITE-6952] JDBC adapter for StarRocks generates incorrect SQL for
REALdatatype - [CALCITE-6950] Use
ANYoperator to check if an element exists in an array throws exception - [CALCITE-6386] Elasticsearch adapter throws
NullPointerExceptionwhen used with model.json and no username, password or pathPrefix - [CALCITE-6080] The simplified form after applying
AggregateReduceFunctionsRuleis giving wrong results forSTDDEV,Covariancewithdoubleanddecimaltypes - [CALCITE-4993] Simplify
EQUALSorNOT-EQUALSwith other number comparison - [CALCITE-4915] Test for query with unqualified common column and
NATURAL JOIN - [CALCITE-4723] Check whether JDBC adapter generates
GROUP BY ()against Oracle, DB2, MSSQL - [CALCITE-1583] Wrong results for query with correlated subqueries with aggregate subquery expression
- [CALCITE-7053] In
HepPlanner, move down the collectGarbage to topological order for better optimizer performance - [CALCITE-7049] When performing garbage collection,
HepPlannershould clear the metadata cache - [CALCITE-7221] Make
HepPlanner.getVertexParents()protected - [CALCITE-7219] Enhance functional dependency computation performance using the existing caching mechanisms
- [CALCITE-7215] Simplify
SEARCHoperand inRexSimplify.simplifySearch - [CALCITE-7203]
IntersectToSemiJoinRuleshould compute once the join keys and reuse them to avoid duplicates - [CALCITE-7199] Improve column uniqueness computation for Join
- [CALCITE-7174] Improve lossless cast detection for numeric types
- [CALCITE-7173] Improve
RelMdDistinctRowCountestimation for lossless casts - [CALCITE-7155] Some optimization can be done according to error prone suggestions
- [CALCITE-7153] Mixed wildcards of
_and%need to be simplified inLIKEoperator - [CALCITE-7141] Add missing getter to
FunctionSqlType - [CALCITE-7130]
DiffRepositorydoes not enforce any order on XML resources - [CALCITE-5716] Two level nested correlated subquery translates to incorrect
ONcondition - [CALCITE-3190] ElasticsearchJson throws
ExceptionwhenvisitMappingProperties - Add getter method for
Uncollect.itemAliases
Build and test suite
- [CALCITE-7129] Drop
@RuleConfigannotation used in Quidem tests - [CALCITE-7060] Enable dumping high-level plans in quidem tests
- [CALCITE-7179] Improve error message for QuidemTest
- [CALCITE-7235] Support Flexible HEP and Volcano Planner Rule Configuration in Quidem Tests
- [CALCITE-7253] Add default programs like
DecorrelateProgramto the Hep-Rule Test - [CALCITE-7071] Add test for replacing
JOINnode with its child node whenJOINcondition isfalse - [CALCITE-7161] Calcite-snapshots Jenkins builds fail due to corrupted caches
- Enable some disabled quidem tests
Web site and documentation
- [CALCITE-7137] Small nit: method name wrong in documentation for hint strategy
- Add link to new blog post on Calcite constant folding
- Update ASF logo links
- Fix aspect ratio for ASF logos
1.40.0 / 2025-05-28
This release comes 2 months after 1.39.0, contains contributions from 20 contributors, and resolves 102 issues.
Highlights include the addition of several improvements and additional optimization rules, notably advanced set operation handling with new rules for converting INTERSECT to semi-joins and EXISTS subqueries, MINUS to anti-joins and filters, and optimizing UNIONs with common sources, join optimization is improved through predicate expansion from disjunctions and specialized handling of complex join conditions, additional optimizations include new rules for MIN/MAX aggregates and smarter filter-sort interactions, addition of Doris, DuckDB, SQLite, and Trino dialects, as well as improved support for ClickHouse, support for aliases referencing lateral columns, support for defining which rule sets to apply for individual Quidem tests.
Contributors to this release: Alessandro Solimando (release manager), Chuxin Chen, Evgeniy Stanilovsky, Julian Hyde, Juntao Zhang, Kurt Alfred Kluever, Mihai Budiu, Niels Pardon, Ruben Quesada Lopez, Sergey Nuyanzin, Silun Dong, Stamatis Zampetakis, suibianwanwan, sulees, Ulrich Kramer, wangdiao, Wei Zhou, Xiong Duan, Yu Xu, Zhen Chen, zhuyufeng
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 23; Guava versions 21.0 to 33.3.0-jre; other software versions as specified in gradle.properties.
Breaking Changes
-
[CALCITE-6920] The fix introduces a new property of the type system called
mapKeysCanBeNullable()which indicates if keys in a map can be nullable. -
[CALCITE-6901] changes the way
SINGLE_VALUEis rewrittenMySQLdialect leading to a different exception thrown in case of multiple values. Before:SQL error [1140] [42000]: In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column '*****'; this is incompatible with sql_mode=only_full_group_byAfter:SQL error [1242] [21000]: Subquery returns more than 1 row -
[CALCITE-6944]
toSqlStringnow doesn’t add an extra pair of parentheses for table functions. Before:F(A => (TABLE T PARTITION BY F1 ORDER BY F2), B => 1)After:F(A => TABLE T PARTITION BY F1 ORDER BY F2, B => 1) -
[CALCITE-6964]
SqlDelete#getOperandListnow returns the elements from the sourceSELECTcomponent. -
[CALCITE-6989]
RexBuilder#makeInnow creates aSEARCHexpression forARRAYliterals, similarly to what it does forROWliterals. TakingRexBuilder#makeIn($0, ARRAY [100, 200], ARRAY [300, 400])as an example you have: Before:OR(=($0, ARRAY(100, 200)), =($0, ARRAY(300, 400)))After:SEARCH($0, Sarg[[100:INTEGER, 200:INTEGER]:INTEGER NOT NULL ARRAY, [300:INTEGER, 400:INTEGER]:INTEGER NOT NULL ARRAY]:INTEGER NOT NULL ARRAY) - [CALCITE-6959]
- [CALCITE-6961]
Addition of non-default methods for
LogicalAsofJoinandLogicalRepeatUnion, respectively, toRelShuttle.
New features
- [CALCITE-6878] Implement
FilterSortTransposeRule - [CALCITE-6836] Add Rule to convert
INTERSECTtoEXISTS - [CALCITE-6900] Support
Chartype cast in ClickHouse Dialect - [CALCITE-6825] Add support for
ALL,SOME,ANYinRelToSqlConverter - [CALCITE-6888] Doris dialect implementation
- [CALCITE-6820] Trino dialect implementation
- [CALCITE-6891] Implement
IntersectReorderRule - [CALCITE-6880] Implement
IntersectToSemiJoinRule - [CALCITE-6893] Remove agg from Union children in
IntersectToDistinctRule - [CALCITE-6948] Implement
MinusToAntiJoinRule - [CALCITE-6927] Add rule for join condition remove
IS NOT DISTINCT FROM - [CALCITE-6930] Implementing
JoinConditionOrExpansionRule - [CALCITE-6914] Expand join-dependent predicates from disjunction
- [CALCITE-6953] Extend
UnionEliminatorRuleto supportIntersectandMinus - [CALCITE-6966] Change
JoinConditionOrExpansionRulename and accept more predicates that will allow the expansion to be performed - [CALCITE-6969] Support ClickHouse in
SqlLibrary - [CALCITE-6973] Add rule to convert
MinustoFilter - [CALCITE-6988] DuckDB dialect implementation
- [CALCITE-6946] Expand predicates from disjunction for inputs of Join
- [CALCITE-6939] Add support for Lateral Column Alias
- [CALCITE-6985] Add rule to transform
MIN/MAXwithORDER BYandLIMIT 1 - [CALCITE-7000] Extend
IntersectToSemiJoinRuleto support n-way inputs - [CALCITE-6997] SQLite dialect implementation
- [CALCITE-7002] Create an optimization rule to eliminate
UNIONfrom the same source with different filters - [CALCITE-7019] Simplify
NULL IN (20, 10)toNULL - [CALCITE-7008] Extend
MinusToAntiJoinRuleto support n-way inputs - [CALCITE-6951] Add
STRING_TO_ARRAYfunction(enabled in PostgreSQL Library) - [CALCITE-7014] Support
EQUAL/GreaterThanOrEqual/LessThanOrEqualexpressions toRexNodeInCalcitePrepare - [CALCITE-7030] Enhance
TopologicalOrderIteratorto supportBOTTOM_UP - [CALCITE-6887]
ReduceExpressionsRuleapplied to ‘INsubquery’ should make the values distinct if the subquery is aValuescomposed of literals
Dependency version upgrade
- [CALCITE-6975] Upgrade
Quidemversion to 0.12 - Bump
nokogirifrom 1.18.2 to 1.18.8 in/site - Bump
jsonfrom 2.10.1 to 2.10.2 in/site - [CALCITE-7018] Upgrade
Janinofrom 3.1.11 to 3.1.12
Bug-fixes, API changes and minor enhancements
- [CALCITE-6875]
EnumerableFilterRule/EnumerableProjectRuleshould not convert aLogical Filter/ProjecttoEnumerable Filter/Projectwhen it contains Subquery - [CALCITE-6892]
CHAR_LENGTHFunction is not recognized in DerbySQL - [CALCITE-6901]
SINGLE_VALUErewrite to wrong sql in MySQL dialect - [CALCITE-6903]
CalciteSchema#getSubSchemaMapmust consider implicit sub-schemas - [CALCITE-6897]
AbstractConverterof root node is not needed in topdown mode - [CALCITE-6431] Implement the
SINGLE_VALUEaggregation inHiveSqlDialectAndSparkSQLDialect - [CALCITE-6910]
RelToSqldoes not handleASOFjoins - [CALCITE-6913] Some casts inserted by type coercion do not have source position information
- [CALCITE-6834] In query that applies
COALESCEto nullableSUM,EnumerableProjectToCalcRulethrowsAssertionError - [CALCITE-6920] The type derived for a cast to
INT ARRAYalways has non-nullable elements - [CALCITE-2109] MongoAdapter: Support
incondition withandcondition - [CALCITE-6911]
SqlItemOperator.inferReturnTypethrowsAssertionErrorfor out of bounds accesses - [CALCITE-6909] ClickHouse dialect should limit the Precision and Scale of the
Decimaltype to be within 76 - [CALCITE-6931]
STARTSWITH/ENDSWITHin SPARK should not convert toSTARTS_WITH/ENDS_WITH - [CALCITE-6835] Invalid unparse for
IS TRUE,IS FALSE,IS NOT TRUEandIS NOT FALSEinStarRocksDialect - [CALCITE-6904]
IS_NOT_DISTINCT_FROMis incorrectly handled byEnumerableJoinRule - [CALCITE-6936] Table function parameter matching should always be case-insensitive
- [CALCITE-6923]
REGEXP_REPLACE_PG_...: backward references behave differently than in postgres - [CALCITE-6921]
REGEXP_REPLACEwith empty string causesException - [CALCITE-6943] Calcite JDBC adapter for Hive should translate
APPROX_COUNT_DISTINCTtoCOUNT DISTINCT - [CALCITE-6938] Support zero value creation of nested data types
- [CALCITE-6941]
Array/Mapvalue constructor is unparsed incorrectly in ClickHouse - [CALCITE-6945] Use
LITERAL_AGGto simplifySubQueryRemoveRuleby avoiding the extra Project - [CALCITE-6949] ClickHouse not support
floordatetoSECOND/MILLISECOND/MICROSECOND/NANOSECOND - [CALCITE-6840] Hive/Phoenix Dialect should not cast to
REALtype directly - [CALCITE-6959] Support
LogicalAsofJoininRelShuttle - [CALCITE-6958] JDBC adapter for MySQL not support
floordatetoMILLISECOND/MICROSECOND - [CALCITE-6954]
SqlTypeFactoryImpl#leastRestrictivereturns non-canonical collection types - [CALCITE-6961] Support
LogicalRepeatUnioninRelShuttle - [CALCITE-6955]
PruneEmptyRulesdoes not handle the all attribute ofSetOpcorrectly - [CALCITE-2636] SQL parser has quadratic running time when SQL string is very large
- [CALCITE-6944] Align
toSqlStringwith SQL std for Table Args in PTF - [CALCITE-6964]
SqlDelete#getOperandListreturn operands’ both order and size not match withSqlDelete#setOperand - [CALCITE-6967] Unparsing
STARTS_WITH/ENDS_WITH/BITfunctions is incorrect for the Clickhouse dialect - [CALCITE-5985]
FilterTableFunctionTransposeRuleshould not use “Logical”RelNodes - [CALCITE-6980]
RelJsoncannot serialize binary literals - [CALCITE-6974] Default typesystem has incorrect limits for
DECIMALfor Presto/MySQL/Phoenix - [CALCITE-6979] Invalid unparse for
IS TRUE,IS FALSE,IS NOT TRUEandIS NOT FALSEinClickHouseDialect - [CALCITE-6594]
RelMdSizedoes not handleARRAYconstructor calls - [CALCITE-6984]
FamilyOperandTypeCheckerwith a Predicate describing optional arguments does not reject mistyped expressions - [CALCITE-6986] Parser rejects SQL sources that produce an empty statement list
- [CALCITE-6983]
SortJoinTransposeRuleshould not pushSORTpast aJOINwhenSORT’s fetch isDynamicParam - [CALCITE-6432] Infinite loop for
JoinPushTransitivePredicatesRulewhen there are multiple project expressions reference the same input field - [CALCITE-6992]
RelJsoncannot serializeUUIDliterals - [CALCITE-6989] Enhance
RexBuilder#makeInto createSEARCHforARRAYliterals - [CALCITE-6977] Unparse
DELETESQL throws unsupported exception - [CALCITE-6981] Runtime conversion of
DECIMAL ARRAYtoINT ARRAYfails with aClassCastException - [CALCITE-6995] Support
FULL JOINin StarRocks/Doris Dialect - [CALCITE-5387] Type-mismatch on nullability in
JoinPushTransitivePredicatesRuleRelRule - [CALCITE-6999] Invalid unparse for
TRIMinPrestoDialect - [CALCITE-7006] Incorrect
left joinresults withIS NOT DISTINCT FROMunder specific plan - [CALCITE-6962]
Existssubquery returns incorrect result whenorcondition involves null column - [CALCITE-7005] Invalid unparse for
IS TRUE,IS FALSE,IS NOT TRUEandIS NOT FALSEin Hive/Presto Dialect - [CALCITE-6991] Validator cannot infer type for
COALESCEwhen call is not expanded - [CALCITE-7013] Support building
RexLiteralsfromCharactervalues - [CALCITE-7001] Cast of malformed literal to
TIMESTAMP WITH LOCAL TIME ZONEneed to throw informative error - [CALCITE-7025] Verifying the Quantify operator without compatible types, should throw an exception about the Quantify Operator
- [CALCITE-6866]
PostgreSQLDialectsupport to unparseLISTAGGaggregate function - [CALCITE-7022] Decouple
ModelHandlerfromCalciteConnection - [CALCITE-5638] Columns trimmer need to consider sub queries
- [CALCITE-7027] Improve error message in case of several
UNION,INTERSECT,EXCEPTin a query - Documentation Supplement for
MinusToAntiJoinRule - Use
StandardCharsetsinRuleMatchVisualizer.java
Build and test suite
- [CALCITE-6895] Change
JdbcTest.testVersionto strictly match minor version ingradle.properties - [CALCITE-6915] Generalize terminology Linter to allow pattern based checks in commit messages
- [CALCITE-6960] The tests for
SemiJoinRemoveRuleshould explicitly include a semi join - [CALCITE-6957] The
RelOptRulesTesttests should fail if the xml file contains tests that do not exist in Java - [CALCITE-6335] Quidem tests should allow specifying optimization passes to apply to programs
- [CALCITE-6883] Add Javadoc for
RelRoot#isTrivialvariants and refactor related tests - [CALCITE-6998] The command
!set planner-rulesdoes not support rules with multipleConfig
Web site and documentation
- [CALCITE-6934] The examples for DDL extension on the official website cannot run
- Update documentation for example0 in
RelBuilderExample
1.39.0 / 2025-03-16
This release comes 5 months after 1.38.0,
contains contributions from 45 contributors, and resolves 209 issues.
Highlights include
the support of the VARIANT and UUID data types,
the support of checked arithmetic,
the addition of an optimal join enumeration algorithm based on dynamic programming (DPhyp),
new operators and data type support in Arrow adapter,
enhanced SQL compatibility with additional functions across Oracle, PostgreSQL, Hive, Spark, and MSSQL.
Contributors to this release: Aleksey Plekhanov, Alessandro Solimando, Anton Kovalevsky, Binhua Hu, Cancai Cai, Claude Brisson, Clay Johnson, Dmitry Sysolyatin, Dongsheng He, Francis Chuang, Heng Xiao, Hongyu Guo, Hugh Pearse, Illes Solt, Jiajun Xie, Joey Tong, Julian Hyde, Krisztian Kasa, Lino Rosa, Mihai Budiu, Niels Pardon, Oliver Lee, Qi Zhu, Rafael Acevedo, Ruben Quesada Lopez, Silun Dong, Sreeharsha Ramanavarapu, Stamatis Zampetakis (release manager), suibianwanwan, Tanner Clary, tison, TJ Banghart, Ulrich Kramer, Viggo Chen, Vikram Ahuja, Wang Zhao, Xiaochen Zhou, Xiong Duan, Yanjing Wang, YiwenWu, Yu Xu, Zhe Hu, Zhen Chen, Zhengqiang Duan, Zoltan Haindrich.
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 23; Guava versions 21.0 to 33.3.0-jre; other software versions as specified in gradle.properties.
Breaking Changes
-
[CALCITE-6764] introduces a new method
RelDataTypeFactory#enforceTypeWithNullabilityin the existingRelDataTypeFactoryinterface. The behavior of the new function is similar to the existing APIcreateTypeWithNullability; however, the existing implementations of thecreateTypeWithNullabilityAPI cannot create nullable record (ROW) types. Nullable record types are legitimate in several SQL dialects. -
[CALCITE-6685] introduces support for checked arithmetic on short integer types. A new
SqlConformance.checkedArithmetic()attribute is added to control this behavior. TheBIG_QUERYandSQL_SERVER_2008conformance have been changed to use checked arithmetic, matching the specification of these dialects. -
[CALCITE-6704] Limit result size of
RelMdUniqueKeyshandler. Certain query patterns can lead to an exponentially large number of unique keys that can cause crashes and OOM errors. To prevent this kind of issues theRelMdUniqueKeyshandler is now using a limit to restrict the number of keys for each relational expression. The limit is set to1000by default. The value is reasonably large to ensure that most common use-cases will not be affected and at the same time bounds exponentially large results set to a manageable value. Users that need a bigger/smaller limit should create a new instance ofRelMdUniqueKeysand register it using the metadata provider of their choice. -
[CALCITE-6728] introduces new methods to lookup tables and sub schemas inside schemas. The methods used before (
Schema:getTable(String name),Schema:getTableNames(),Schema.getSubSchema(String name)andSchema.getSubSchemaNames(String name)) have been marked as deprecated. - [CALCITE-6766] Move
DATEADDandDATEDIFFfrom PostgreSQL to Redshift library - [CALCITE-6664] Replace
GREATEST,LEASTfunctions in Spark library with the implementation of PostgreSQL Library - [CALCITE-4758] Wrong result when
SOMEsub-query inSqlNodeListis converted toVALUES
New features
- [CALCITE-4918] Support
VARIANTdata type - [CALCITE-6685] Support checked arithmetic
- [CALCITE-6846] Support basic DPhyp join reorder algorithm
- [CALCITE-5409] Implement
BatchNestedLoopJoinfor JDBC - [CALCITE-6738] Support a
UUIDtype natively - [CALCITE-6668] Support
IS TRUE/IS FALSEoperator in Arrow adapter - [CALCITE-6760] Support
TIMEdata type in Arrow adapter - [CALCITE-6690] Support
DECIMALwith precision and scale in Arrow adapter - [CALCITE-6730] Add
CONVERTfunction (enabled in Oracle library) - [CALCITE-6666] Support Oracle
SYSDATEandSYSTIMESTAMPfunctions - [CALCITE-6821] Support
CRC32function for Hive and Spark library - [CALCITE-6844] Enable various existing
ARRAYfunctions in Hive - [CALCITE-6800] Enable a few existing functions to Hive library
- [CALCITE-6831] Add
ARRAY_SLICEfunction(enabled in Hive Library) - [CALCITE-6689] Add
INSTRfunction in Hive library - [CALCITE-6815] Support
BINfunction for Spark and Hive Library - [CALCITE-6812] Support
BASE64andUNBASE64functions for Hive - [CALCITE-6805] Support
HEXfunction for Hive and Spark Library - [CALCITE-4860] Support
NULLS FIRSTandNULLS LASTquery in Elasticsearch adapter - [CALCITE-6726] Support
%(modulo) operator in MSSQL - [CALCITE-6678] Support
DUALtable query when db provides this feature - [CALCITE-6645] Support user-defined function without parentheses when db dialect’s
allowNiladicParenthesesproperty is false - [CALCITE-6663] Support
SPLIT_PARTfunction for PostgreSQL - [CALCITE-5612] Support PostgreSQL’s
SET TRANSACTIONcommand in Babel parser - [CALCITE-6643] Enable
LENGTH/CHAR_LENGTHfunction inPrestoSqlDialect - [CALCITE-6633] Add
CEILINGto MSSQL dialect - [CALCITE-6612] Add
DATE_SUBfunction(enabled in Spark library) - [CALCITE-6618] Support
NOT EQUALSoperator in Arrow adapter
Dependency version upgrade
- [CALCITE-6871] Upgrade avatica from 1.25.0 to 1.26.0
- [CALCITE-6794] Site Gemfile contains vulnerable ruby libraries
- [CALCITE-6782] Upgrade Cassandra to 4.1.6 and Cassandra driver to 4.18.1
Bug-fixes, API changes and minor enhancements
- [CALCITE-6885]
SqlToRelConverter#convertUsingshould not fail ifcommonTypeForBinaryComparisonreturns null - [CALCITE-6650] Optimize the
IN/SOMEsub-query using metadata row count - [CALCITE-6877] Generate
LogicalProjectinRelRoot.project()when mapping is not name trivial - [CALCITE-6879] Support
APPROX_DISTINCT_COUNTfor more dialects - [CALCITE-6876] Druid Adapter support more functions
- [CALCITE-6788]
LoptOptimizeJoinRuleshould be able to delegate costs to the planner - [CALCITE-6870]
FilterToCalcRule/ProjectToCalcRuleshould not convert aFilter/ProjecttoCalcwhen it contains sub-query - [CALCITE-6874]
FilterCalcMergeRule/ProjectCalcMergeRuleshould not merge aFilter/ProjecttoCalcwhen it contains sub-query - [CALCITE-6873]
FilterProjectTransposeRuleshould not push theFilterpast theProjectwhen theFiltercontains a sub-query with correlation - [CALCITE-6867] Druid Adapter transforms an SQL
NOT INfilter to a DruidINfilter - [CALCITE-6850]
ProjectRemoveRulewith two projects does not keep field names from the top one - [CALCITE-6864]
ProjectAggregateMergeRuleloses the project’s field names - [CALCITE-6652]
RelDecorrelatorcan’t decorrelate query withLIMIT1 - [CALCITE-6837] Invalid code generated for
ROW_NUMBERfunction inEnumerableconvention - [CALCITE-6274] Join between Elasticsearch indexes returns empty result
- [CALCITE-6853] Nested window aggregate throws
UnsupportedOperationExceptionwith the defaultValidatorConfig - [CALCITE-6847] ClickHouse doesn’t support
TRUE/FALSEkeywords in join predicate - [CALCITE-6819] MSSQL doesn’t support
TRUE/FALSEkeywords in join predicate - [CALCITE-6832] Redundant
fields/nullableentries inSTRUCTserialization to JSON - [CALCITE-6839] SUM function throws overflow exceptions due to incorrect return types
- [CALCITE-6833] JDBC adapter generates invalid table alias for semi-join in
UNION - [CALCITE-6824] Sub-query in join conditions rewrite fails if referencing a column from the right-hand side table
- [CALCITE-6838]
RelToSqlConvertershould generate double parentheses when the input toUNNESTis a query statement - [CALCITE-6785]
RelToSqlConvertergenerate wrong sql whenUNNESThas a correlate variable - [CALCITE-6804] Anti-join with
WHERE NOT EXISTSsyntax has corrupted condition - [CALCITE-6817] Add string representation of default nulls direction for
RelNode - [CALCITE-6818] Write
LIMITfor fetch operations in Snowflake - [CALCITE-6790] Write
LIMITfor fetch operations in Vertica - [CALCITE-6813]
UNNESTinfers incorrect nullability for the result when applied to an array that contains nullableROWvalues - [CALCITE-6796] Convert Type from
BINARYtoVARBINARYin PrestoDialect - [CALCITE-6771] Convert Type from
FLOATtoDOUBLEin PrestoDialect - [CALCITE-6503]
JdbcAdaptercannot push downNOT INsub-queries - [CALCITE-6303] UNION with CTE(s) results in exception during query validation
- [CALCITE-4561] Wrong results for plan with
EnumerableHashJoin(semi) on nullable colunms - [CALCITE-6791] Search pattern during matching in
REPLACEfunction should be case insensitive in MSSQL - [CALCITE-6786]
ANY/SOMEoperator yields multiple rows in correlated queries - [CALCITE-2295] Correlated sub-query with project generates wrong plan
- [CALCITE-6756] Preserve
CASTofSTRINGoperand in binary comparison for PostgreSQL - [CALCITE-6778]
SOMErewrite for correlated queries does not handle null values correctly - [CALCITE-6764] Field access from a nullable
ROWshould be nullable - [CALCITE-6744]
RelMetadataQuery.getColumnOriginsshould return null when column origin includes correlation variables - [CALCITE-6754] Remove deprecated method calling in
Driver - [CALCITE-5626] Sub-query with fully-qualified table name throws ‘table not found’ during validation
- [CALCITE-6301] Following “must-filter” columns, add “bypass” columns
- [CALCITE-6776] Multiple expanded
IS NOT DISTINCT FROMcannot be collapsed back - [CALCITE-6779] Casts from
UUIDtoDATEshould be invalid - [CALCITE-6777] Conversion between
UUIDandBINARYproduces wrong results - [CALCITE-6774]
REPLACEfunction returns wrong result when search pattern is an empty string - [CALCITE-6413]
SqlValidatordoes not invokeTypeCoercionImpl::binaryComparisonCoercionfor bothNATURALandUSINGjoin conditions - [CALCITE-6775]
ToCharandToTimestampPG implementors should use translator’s root instead of creating a new root expression - [CALCITE-6770] Preserve column names when casts are inserted in projects
- [CALCITE-6745] UDF without parameters cannot be validated when use default conformance
- [CALCITE-6762] Preserving the
CASTconversion for operands in Presto - [CALCITE-6749]
RelMdUtil#setAggChildKeysmay return an incorrect result - [CALCITE-6699] Invalid unparse for
VARCHARin StarRocksDialect - [CALCITE-3772]
RelFieldTrimmerincorrectly trims fields when the query includes correlated sub-query - [CALCITE-6751] Reduction of
CASTfrom string to interval is incorrect - [CALCITE-6759]
RelToSqlConverterreturns the wrong result whenAggregateis onSort - [CALCITE-6759]
SqlToRelConvertershould not removeORDER BYin sub-query if it has anOFFSET - [CALCITE-6761] StarRocks generates incorrect SQL for certain units in the
EXTRACTfunction - [CALCITE-6746]
ProjectWindowTransposerule is unsound - [CALCITE-6727] Column uniqueness constrain should only apply to inner join
- [CALCITE-6649] Enhance
RelMdPredicatespull up predicate from project - [CALCITE-6740]
RexToLixTranslatorgenerates code with many redundant structures - [CALCITE-6742]
StandardConvertletTable.convertCallloses casts fromROWcomparisons - [CALCITE-6741] The type of a comparison is nullable when either operand is nullable
- [CALCITE-6665] Add
isEmptymetadata to check if a relational expression returns no rows - [CALCITE-6691]
QUALIFYon project references wrong columns - [CALCITE-6735] Type coercion for comparisons does not coerce
ROWtypes - [CALCITE-6734]
RelFieldTrimmershould trimAggregate’s input fields which are arguments of unused aggregate functions - [CALCITE-6736] Validator accepts comparisons between arrays, multisets, maps without regard to element types
- [CALCITE-6737]
LoptOptimizeJoinRulecan not identify selfjoin on unique join keys - [CALCITE-6725] The caching mechanism key in
ElasticsearchSchemaFactoryis affected by the order of hosts - [CALCITE-6733] Type inferred by coercion for comparisons with decimal is too narrow
- [CALCITE-6700] MySQL
BIT_COUNTfunction should return result when parameter isBOOLEAN,STRING,DATE,TIMEandTIMESTAMPtype - [CALCITE-6566] JDBC adapter should generate
PIfunction with parentheses in most dialects - [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times
- [CALCITE-6714] Cast literal to interval gives the wrong result if literal is casted
- [CALCITE-6715] Enhance
RelFieldTrimmerto trimLogicalCorrelatenodes - [CALCITE-6146] Target charset should be used when comparing two strings through
CONVERT/TRANSLATEfunction during validation - [CALCITE-6723] Type inference for
ARRAY_INSERTfunction is incorrect - [CALCITE-6721] Incorrect implementation of
SqlFunction.checkedDivide - [CALCITE-6711] Functions whose output value can be null should return a nullable type
- [CALCITE-6720] Refactor cross product logic in
RelMdUniqueKeys#getPassedThroughColsusingLinq4j#product - [CALCITE-6688] Allow operators of
SqlKind.SYMMETRICALto be reversed - [CALCITE-4954] Group
TEXTfield failed in Elasticsearch adapter - [CALCITE-6713]
NVL2’s return data type should be nullable if and only if at least one of the second and third parameters are nullable - [CALCITE-6712]
FROM_BASE64andPARSE_URLreturn data type should always be nullable - [CALCITE-6709] Parser accepts a call to
TRIMwith no arguments - [CALCITE-6706] Checked arithmetic does not take effect in sub-queries
- [CALCITE-6707] Type inference for
CHRfunction is wrong - [CALCITE-6684] Support Arrow filter pushdown conditions that have subexpressions of a decimal type
- [CALCITE-6705] Allow for dialect-specific unparsing for numeric literals
- [CALCITE-6640]
RelMdUniqueKeysgenerates non-minimal keys when columns are repeated in projections - [CALCITE-6703]
RelJsoncannot handle timestamps prior to 1970-01-25 20:31:23.648 - [CALCITE-5590]
NullPointerExceptionwhen convertingINexpression that is used insideSELECTlist andGROUP BY - [CALCITE-6647]
SortUnionTransposeRuleshould not push sort past a union when sort’s fetch isDynamicParam - [CALCITE-6586] Rules not firing due to
RelMdPredicatesreturningnullinVolcanoPlanner - [CALCITE-6614]
InnodbFilterRuleincorrectly constructs condition when creatingInnodbFilter - [CALCITE-6615]
BindableTableScanestimateRowCountdoes not calculate push down filters - [CALCITE-6680]
RexImpTableerroneously declaresNullPolicy.NONEforIS_EMPTY - [CALCITE-6674] Make
RelDecorrelatorrules configurable - [CALCITE-6682] Framing unsupported error message lacks
LAG/LEADfunctions - [CALCITE-4512]
GROUP BYexpression with argument name same withSELECTfield and alias causes validation error - [CALCITE-6677]
HAVINGclauses fail validation when type coercion is applied toGROUP BYclause - [CALCITE-6651] Use
RelBuilderinSqlToRelConverterto constructUnion - [CALCITE-6350] Unexpected result from
UNIONwith literals expression - [CALCITE-6662]
RelJson.rangePointFromJsoncannot create Double numerics - [CALCITE-4590] Incorrect query result with fixed-length string
- [CALCITE-6655] Aggregation of deeply nested window not detected when unparsing
- [CALCITE-6605] Lattice SQL supports complex column expressions
- [CALCITE-5532]
CompositeOperandTypeCheckershould check operands without type coercion first - [CALCITE-6642]
AggregateUnionTransposeRuleshould account for changes in nullability of pushed down aggregates - [CALCITE-6641] Compiling programs with
ASOFjoins can report obscure errors - [CALCITE-6607]
RexExecutorcan throw during evaluation - [CALCITE-6639] Optimization that pulls up predicates causes
ASOFJOIN validation failure - [CALCITE-6632] Wrong optimization because window missing constants in digest
- [CALCITE-6637] Date type results should not be automatically converted to
TIMESTAMPin Arrow adapter - [CALCITE-6604] Add support for
SqlWindowTableFunctioninRelToSqlConverter - [CALCITE-5156] Support implicit integer types cast for
INsub-query - [CALCITE-6638] Expression simplification such as
1 > a or 1 <= a or a is nulltoTRUEis incorrect when casts are not lossless - [CALCITE-6631] Common type for a comparison operator is wrong when comparing a Java type long with a SQL type
INTEGER - [CALCITE-6608]
RexBuilder#makeInshould createEQUALSinstead ofSEARCHfor single point values - [CALCITE-6623] MongoDB adapter throws a
ClassCastExceptionwhenDecimal128orBinarytypes are used, or when a primitive value is cast to a string - [CALCITE-5036] Remove RexSimplify from RelMdPredicates#getPredicates to avoid performance regression
- Reduced the number of type checks
- Remove
IN_FENNELoperator - Remove unused properties in CalciteResource.properties
- Add method
ImmutableBitSet.stream() - Casts between time intervals do not require scaling
- Implement
VARIANTfunctionsTYPEOF,VARIANTNULL
Build and test suite
- [CALCITE-6865] Sonar analysis fails due to OOM
- [CALCITE-6856] Add JOIN test for MongoDB adapter
- [CALCITE-6827] Build failure due to json-smart version mismatch
- [CALCITE-6806] Add CI action to ensure site remains buildable after changes
- [CALCITE-6747] Multiple SLF4J bindings in Spark unit test
- [CALCITE-6810] Update tests for
CONVERT_TIMEZONEandCONCATfunction in RedShift library - [CALCITE-6801] Linter should disallow tags such as ‘Chore’ in commit messages
- [CALCITE-6803] Publish website: error while trying to write to /home/
- [CALCITE-5127] Enable tests in unnest.iq
- [CALCITE-6780]
AbstractSqlTesterfails to build query for expressionTRIM(string) - [CALCITE-6769] Migrate Build Scan publication to develocity.apache.org
- [CALCITE-6732]
CHRandREPEATfunction are not covered by Redshift library inSqlOperatorTest - [CALCITE-6724]
MockTablesupport for multiple (individual & composite) keys - [CALCITE-6676]
DiffRepositorydoes not update log (_actual) file when assertion fails - [CALCITE-6635] Refactor Arrow adapter Test
- [CALCITE-6592] Add test for
RelMdPredicatespull up predicate fromUNIONwhen it’s input predicates includeNULLvalues - Add
IS_UNKNOWNoperator test in Arrow Adapter - Add
TRIMfunction unit test for Hsqldb
Web site and documentation
- [CALCITE-6758] Update Elasticsearch adapter tutorial document
- [CALCITE-6698] Add Javadoc to
PartiallyOrderedSet#getNonChildrenandgetNonParentsto clarify their behavior - [CALCITE-6613] Make the Background code examples in Calcite official documentation clearer
- [CALCITE-6610] ASF matomo integration for website analytics
- [CALCITE-6845] Self-host website images
- [CALCITE-6843] Self-host Lato font on website due to ASF’s content security policy
- Site: Reformat
CONCAT_WSandREVERSEdocument - Site: Add talks from Calcite Meetup February 2025
- Update document for resolve in SqlValidatorScope
- Update javadoc for the fun connect string parameter
- Improve document in RelBuilder
- Modify
DAYNAMEandMONTHNAMEdoc description when set different locale
1.38.0 / 2024-10-15
This release comes 5 months after 1.37.0,
contains contributions from 39 contributors, and resolves 165 issues.
Highlights include the
AS MEASURE
clause to define measures and use them in
simple queries,
ASOF join,
the
EXCLUDE
clause in window aggregates, Postgres-compatible implementations of the
TO_DATE, TO_TIMESTAMP
and
TO_CHAR
functions, and the extension of the type system to allow
types with negative scale.
Contributors to this release: Aleksey Plekhanov, Alessandro Solimando, Barry Kelly, Bowen Yang, Cancai Cai, Clay Johnson, Cyril de Catheu, Dawid Wysakowicz, Evgeniy Stanilovsky, Fan Luo, Gian Merlino, Ian Bertolacci, Itiel Sadeh, James Duong, Jiabao Sun, Jiajun Xie, jianhong.hu, Jie Cheng, Julian Hyde (release manager), Konstantin Orlov, Krisztian Kasa, Michael Mior, Mihai Budiu, Mou Wu, Niels Pardon, Nitish Kumar, Norman Jordan, Pranava B, Rodrigo Rueda, Ruben Quesada Lopez, Sergey Nuyanzin, Stamatis Zampetakis, suibianwanwan, Tim Grein, TJ Banghart, Wegdan Ghazi, Xiong Duan, YiwenWu, Zoltan Haindrich.
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 23; Guava versions 21.0 to 33.3.0-jre; other software versions as specified in gradle.properties.
Breaking Changes
Cast to DECIMAL. In previous versions of Calcite the casts to
DECIMAL types were treated as no-ops. After the fix of
[CALCITE-6322],
calculations that use DECIMAL values may produce slightly
different results.
Represention of floating point values in RexLiteral.
Previously, floating point values were encoded into BigDecimal
values. This caused precision loss
when representing the results of simplifying expressions whose
results are floating point. After the fix of
[CALCITE-2067],
RexLiteral stores the value of a SQL DOUBLE, FLOAT or REAL values
using a Java double. The result of RexLiteral.getValue() accordingly
changes type in this case.
Deprecated methods in interface RelDataTypeSystem.
[CALCITE-6598]
deprecates methods getMaxNumericScale() and getMaxNumericPrecision(),
to be consistent with getMinScale(SqlTypeName) added in
[CALCITE-6560].
From 1.38, you should instead call getMaxScale(DECIMAL) and
getMaxPrecision(DECIMAL). If you have overridden these methods, Calcite will
continue to call your overriding method in 1.38 but will cease in 1.39.
To avoid this breaking change in 1.39, during 1.38 you should move your
override logic to the getMaxScale and getMaxPrecision methods.
New features
- [CALCITE-6603] Lattice SQL supports generation of specified dialects
- [CALCITE-6560] Allow types with negative scale
- [CALCITE-6576]
In
SETclause ofUPDATEstatement, allow column identifiers to be prefixed with table alias - [CALCITE-6584]
Validate prefixed column identifiers in
SETclause ofUPDATEstatement - [CALCITE-4838]
Add
RoundingModeinRelDataTypeSystemto specify the rounding behavior - [CALCITE-6020]
Add planner rule,
class ProjectOverSumToSum0Rule, that convertsSUMtoSUM0 - [CALCITE-6372]
Add
ASOFjoin - [CALCITE-6519]
Support non-aggregate query that uses measure in
ORDER BY - [CALCITE-4496]
Measure columns (
SELECT ... AS MEASURE) - [CALCITE-5802]
In
RelBuilder, add methodaggregateRex, to allow aggregating complex expressions such as “1 + SUM(x + 2)” - [CALCITE-6444] Add a function library for Amazon Redshift
- [CALCITE-6427]
Use a higher precision for
DECIMALintermediate results for some aggregate functions likeSTDDEV - [CALCITE-5855]
Support frame exclusion in window functions, e.g.
OVER (... EXCLUDE CURRENT ROW) - [CALCITE-6365]
Support
RETURNINGclause ofJSON_QUERYfunction
New functions:
- [CALCITE-3592]
Implement
BITNOTscalar function - [CALCITE-6527]
Add
DATE_ADDfunction (enabled in Spark library) - [CALCITE-6549]
Add
LOG1Pfunction (enabled in Spark library) - [CALCITE-3779]
Implement
BITAND,BITOR,BITXORscalar functions - [CALCITE-3697]
Implement
BITCOUNTscalar function - [CALCITE-5807]
Add
SUBSTRING_INDEXfunction (enabled in Spark library) - [CALCITE-6396]
Add
ADD_MONTHSfunction (enabled in Oracle, Spark library) - [CALCITE-6310]
Add
REGEXP_REPLACEfunction (enabled in Postgres library) - [CALCITE-6472] Add degree-based trigonometric functions to Postgres function library
- [CALCITE-6312]
Add
LOGfunction (enabled in Postgres library) - [CALCITE-6445]
Add
REVERSEfunction (enabled in Spark library) - [CALCITE-6449]
Enable Postgres implementations of
TO_DATEandTO_TIMESTAMPfunctions - [CALCITE-5634]
Enable
GREATEST,LEASTfunctions in Postgres library - [CALCITE-6446]
Add
CONCAT_WSfunction (enabled in Spark library) - [CALCITE-6454] Implement array comparison operators
- [CALCITE-6325]
Add
LOGfunction (enabled in MySQL and Spark library) - [CALCITE-6392]
Support all Postgres 14 date/time patterns for
TO_DATEandTO_TIMESTAMP - [CALCITE-6441]
Add
BOOLAGG_AND,BOOLAGG_ORaggregate functions (enabled in Snowflake library) - [CALCITE-6311]
Support Postgres
DATE_PARTfunction - [CALCITE-6424]
Enable
RLIKEfunction in MySQL library - [CALCITE-6397]
Add
NVL2function (enabled in Oracle, Spark library) - [CALCITE-6358]
Support all Postgres 14 date/time patterns for
TO_CHARfunction - [CALCITE-6313]
Add
POWERfunction for Postgres - [CALCITE-6483]
Enable
LENandLENGTHin the correct function libraries
Dependency version upgrade
- [CALCITE-6587] Support Java 23 and Guava 33.3.0; also upgrade Hadoop from 2.7.5 to 2.10.2
- [CALCITE-5737] Support JDK 21 and JDK 22; also upgrade asm from 7.2 to 9.6; byte-buddy from 1.9.3 to 1.14.15; forbiddenapis from 3.5.1 to 3.7; mockito from 2.23.4 to 3.12.4
- [CALCITE-6174] Upgrade gradle from 7.6.1 to 8.7
Bug-fixes, API changes and minor enhancements
- [CALCITE-6620]
VALUEScreated byRelBuilderdo not have a homogeneous type - [CALCITE-6617]
TypeCoercionis not applied correctly to comparisons - [CALCITE-6598]
In
interface RelDataTypeSystem, deprecate methodsgetMaxNumericScaleandgetMaxNumericPrecision - [CALCITE-6599]
RelMdPredicatesshould pull up more predicates fromVALUESwhen there are several literals - [CALCITE-6585]
In the Postgres
TO_CHARfunction, improve caching - [CALCITE-6593]
EnumerableHashJointhrowsNullPointerExceptionwhen outer-joining tables with many fields and unmatching rows - [CALCITE-6600]
AggregateJoinTransposeRulethrowsArrayIndexOutOfBoundsExceptionwhen applied on aSemiJoin - [CALCITE-6595]
Preserve collation on non-distinct aggregate calls in
AggregateExpandWithinDistinctRule - [CALCITE-6596] Enable function-level cache by default
- [CALCITE-6498] Elasticsearch multi-field mappings do not work
- [CALCITE-6374]
LatticeSuggesterthrowsNullPointerExceptionwhen aggregate call is covered withCAST - [CALCITE-6226]
Wrong
ISOWEEKand noISOYEARin BigQueryFORMAT_DATEfunction - [CALCITE-6522]
MAP_KEYSandMAP_VALUESfunctions should throw if a key value is null - [CALCITE-6071]
RexCallshould carry source position information for runtime error reporting - [CALCITE-6581]
Incorrect
INTERVALmath forWEEKandQUARTER - Check for correlation variables in project when constructing aggregate in
SqlToRelConverter.createAggImpl - [CALCITE-6550] Improve SQL function overloading
- [CALCITE-6343]
Ensure that
ASoperator doesn’t change return type of measures - [CALCITE-6408]
Not-null
ThreadLocal - [CALCITE-6563]
RelToSqlConvertershould not merge two window functions - [CALCITE-6569]
RelToSqlConvertermissingIGNORE NULLSfor window function - [CALCITE-6565]
JDBC adapter for MSSQL generates incorrect SQL for
CHARwithout precision - [CALCITE-6557]
AggregateMergeRulethrowsAssertionError“type mismatch” - [CALCITE-6559]
Query with measure that applies
AVGtoSMALLINTthrowsAssertionError“Cannot add expression of different type to set” - [CALCITE-4871]
CASTa literal toDECIMALtype returns wrong result - [CALCITE-6555]
RelBuilder.aggregateRexwrongly thinks aggregate functions of “GROUP BY ()” queries areNOT NULL - [CALCITE-5613]
Assert for number of args for metadata methods at
CacheGeneratorUtil - Use
ACCEPT_SUB_QUERYwhen parsing operands to square-bracketed array constructor function - [CALCITE-6543]
In
RelOptCostImpl, change thetoString()method to be consistent withVolcanoCost - [CALCITE-6547]
Result type inferred for
STDDEV_SAMPis incorrect - [CALCITE-6546]
In JDBC adapter for Hive, must generate an alias for a sub-query in the
FROMclause - [CALCITE-4806]
Lossy
CASTis incorrectly simplified - [CALCITE-5883]
ROWSwindow aggregates ignore frames when there is noORDER BYclause - [CALCITE-6540]
RelOptUtil.pushDownJoinConditionsdoes not correctly adjust the match condition of anASOFjoin - [CALCITE-6534]
Adjust type when pulling up
CalcinJoinUnifyRule - [CALCITE-6533]
Division between
INTEGERandDECIMALproduces incorrect result - [CALCITE-6346] JdbcAdapter loses cast for dynamic filter arguments
- [CALCITE-6501]
AssertionErrorinJoinUnifyRuledue to type mismatch - [CALCITE-6518]
ClassCastExceptionduring validation when loading multiple libraries - [CALCITE-6464]
Type inference for
DECIMALdivision seems incorrect - [CALCITE-6433]
SUBSTRINGfunction can return incorrect empty result - [CALCITE-6481]
Optimize
VALUES - UNION - VALUESto a singleVALUEStheIN-list containsCASTand it is converted toVALUES - [CALCITE-6513]
FilterProjectTransposeRulemay causeOutOfMemoryErrorwhenProjectexpressions are complex - [CALCITE-6471]
Improve performance of
SqlToRelConverterby preventing unconditional conversion ofSqlNodeinstances to string for null-check messages - [CALCITE-6480]
JDBC adapter for Oracle should not generate
CASE WHENexpression that returns aBOOLEANvalue, because Oracle does not support it - [CALCITE-6506]
Type inference for
IN-list is incorrect - [CALCITE-6478]
JSON functions should return
NULLwhen input isNULL - [CALCITE-6322]
Casts to
DECIMALtypes are ignored - [CALCITE-3522]
SqlValidator.validateLiteralrejects literals with aDECIMALtype that require more than 64 bits - [CALCITE-6266]
SqlValidatorExceptionwithLATERAL TABLEandJOIN - [CALCITE-6507] Random functions are incorrectly considered deterministic
- [CALCITE-6502]
Parser loses position information for
Expression3 - [CALCITE-6473]
HAVINGclauses may not contain window functions - [CALCITE-6482]
Oracle dialect convert
BOOLEANliteral when version < 23 - [CALCITE-6495]
Allow
ProjectSetOpTransposeRuleto work with any subclass ofProject - [CALCITE-6485]
AssertionErrorwhen anIN-list containingNULLhas an implicit coercion type converter - [CALCITE-6169]
EnumUtils.convertdoes not implement the correct SQL cast semantics - [CALCITE-6218]
RelToSqlConverterfails to convert correlated lateral joins - [CALCITE-6488]
Ensure collations created by
RelCollationsare canonized once - [CALCITE-6295]
Support
IS NOT NULLin Arrow adapter - [CALCITE-6296]
Support
IS NULLin Arrow adapter - [CALCITE-6475]
RelToSqlConverterfails when theIN-list containsNULLand it is converted toVALUES - [CALCITE-6474]
Aggregatewith constant key can get aRowCountgreater than itsMaxRowCount - [CALCITE-6450]
Postgres
CONCAT_WSfunction throws exception when parameter type is(<CHAR(1)>, <INTEGER ARRAY>) - [CALCITE-6462]
VolcanoPlannerinternal valid may throw exception when log trace is enabled - [CALCITE-6468]
RelDecorrelatorthrowsAssertionErrorif correlated variable is used asAggregategroup key - [CALCITE-3094] Code of method grows beyond 64 KB when joining two tables with many fields
- [CALCITE-6453] Simplify casts which are result of constant reduction
- [CALCITE-6388]
PsTableFunctionthrowsNumberFormatExceptionwhen theusercolumn has spaces - [CALCITE-6435]
SqlToRelConverterincorrectly simplifies someINexpressions - [CALCITE-6460]
SortRemoveConstantKeysRulefails withAssertionErrordue to mismatched collation on resultingSort - [CALCITE-6401]
JDBC adapter cannot push down
JOINwhose condition includesIS TRUE,IS NULL, dynamic parameter,CAST, literal comparison - [CALCITE-6436]
JDBC adapter generates SQL missing parentheses when comparing 3 values with
the same precedence, such as “
(a = b) = c” - [CALCITE-6369]
Expanding
*(star) givesArrayIndexOutOfBoundsExceptionwith redundant columns andUSING - [CALCITE-6442]
Validator rejects
FILTERinOVERwindows - [CALCITE-6380]
Casts from
INTERVALandSTRINGtoDECIMALare incorrect - [CALCITE-6008]
ARRAY_AGGshould returnARRAY NULLwhen there are no input rows - [CALCITE-6414]
JDBC adapter should generate
BOOLOR_AGG,BOOLAND_AGGforMAX,MINonBOOLEANvalues in Snowflake dialect - [CALCITE-6434]
JDBC adapter generates wrong SQL for Spark and Hive because it fails to quote
an identifier containing “
$” - [CALCITE-6426]
JDBC adapter for StarRocks generates invalid SQL for
INTandBIGINTtypes - [CALCITE-6430]
JDBC adapter for Postgres, MySQL and HSQLDB generates incorrect SQL for
SINGLE_VALUEwhen the sub-query returns one not-NULLvalue andNULLvalue - [CALCITE-6429] Arrow adapter should default to the Enumerable convention for unsupported filters
- [CALCITE-6370]
ASoperator problems withUSINGclause - [CALCITE-6422]
Query with “
<>” throwsNullPointerExceptionduring materialized view matching - [CALCITE-6423]
JDBC adapter for MySQL generates invalid SQL for
CHARwithout precision - [CALCITE-6244]
Improve
Expressions#constantto allow Java records - [CALCITE-6419]
JDBC adapter for Hive and Spark generates invalid SQL for
VARCHARwithout precision - [CALCITE-6417]
JDBC adapter for Hive generates wrong SQL for
MAPandARRAYvalue constructors - [CALCITE-6416]
Remove unnecessary
SUBSTRINGrewrite inSparkSqlDialect - [CALCITE-6415]
Invalid unparse for
TIMESTAMPwithHiveSqlDialect - [CALCITE-6340]
RelBuilderdrops traits when aggregating over duplicate projected fields - [CALCITE-6400]
MAP_ENTRIESfunction should throw if a key value is null - [CALCITE-6389]
RexBuilder.removeCastFromLiteraldoes not preserve semantics for some types of literal - [CALCITE-6382]
Type inference for
SqlLeadLagAggFunctionis incorrect - [CALCITE-6395]
Significant precision loss when representing
REALliterals - [CALCITE-6377]
TIMEexpression causesIllegalStateException - [CALCITE-6361]
Uncollect.deriveUncollectRowTypethrowsAssertionErrorif the input value is not a collection - [CALCITE-6376]
Selecting 6 columns with
QUALIFYoperation results in exception
Build and test suite
- [CALCITE-6609]
Remove redundant warning suppression for Guava’s
BetaandUnstableAPIs - [CALCITE-6493] Add MySQL and other professional term restrictions
- [CALCITE-6580]
Remove uses of method
Locale.setDefault - Try automatically marking PRs as stale
- [CALCITE-6572]
Add more tests for
NULLarguments toTO_CHARfunctions - Add tests for year month intervals
- Add
cast.iq, a Quidem test forCAST - [CALCITE-6552] Enable CheckerFramework in ‘server’ module
- Remove
FENNEL_VM; enable some disabled tests - [CALCITE-6526]
Refactor
DEVELOCITY_ACCESS_KEYdefinition in one place - [CALCITE-5034] Remove unused remote S3 build cache
- Enable more tests in
RelBuilderExample - [CALCITE-6515] Remove constants describing which bugs have been fixed in Bug
- [CALCITE-6514]
Enable tests about
AssertionErrorwhile translatingIN-list that containsNULL - [CALCITE-6496]
Enable tests from
outer.iq - [CALCITE-6490]
Missing tests for
SqlFunctions.overlay - [CALCITE-6511] Migrate from Gradle Enterprise Gradle Plugin to Develocity Gradle Plugin
- [CALCITE-6484]
Sonar analysis fails intermittently due to
OutOfMemoryError - [CALCITE-6497]
Use helper setup method throughout whole
ElasticsearchAdapterTest - Add Steelwheels data set
- [CALCITE-6470] Run specific JMH benchmarks without modifying sources
- [CALCITE-6466] Add benchmark for SQL parser instantiation
- Add
testSortRemoveConstantKeyWhenOrderByIsNullinRelOptRulesTest - Test case for
[CALCITE-4921]
Nested
NATURAL JOINorJOINwithUSINGcan’t find common column - Remove conditional
stream.iqexecution
Web site and documentation
- [CALCITE-6531]
Correct Javadoc example in
SqlStaticAggFunction.constant - Change Mihai Budiu’s role
- [CALCITE-6487]
TRIMfunction documentation refers tostring1two times - Improve
OVERLAYoperator docs and fix typo in exception - Document
MAPtypes in grammar - [CALCITE-6428] Typo in adapter documentation
- [CALCITE-6383]
class SameOperandTypeCheckeris incorrectly documented
1.37.0 / 2024-05-06
This release comes 5 months after 1.36.0,
contains contributions from 46 contributors, and resolves 138 issues.
It’s worth highlighting the introduction of adapter for Apache Arrow
([CALCITE-2040]),
StarRocks dialect
([CALCITE-6257]).
The release also added support for lambda expressions in SQL
([CALCITE-3679]),
‘must-filter’ columns
([CALCITE-6219]).
For table function calls it is now possible to use them without TABLE() wrapper
in FROM
([CALCITE-6254]).
Furthermore, there is support for optional FORMAT of CAST operator from SQL:2016
([CALCITE-6254])
and more than 15 new SQL functions in various libraries such as BigQuery,
Postgres and Spark.
Contributors to this release: abhishekagarwal87, Adam Kennedy, Alessandro Solimando, Barry Kelly, Benchao Li, Bruno Volpato, caicancai, chen768959, Clint Wylie, Corvin Kuebler, Devaspati Krishnatri, Dmitry Sysolyatin, Dylan Chen, Forward Xu, Francis Chuang, Hanumath Maduri, Hongyu Guo, James Duong, Jerin John, Jiajun Xie, Julian Hyde, Leonid Chistov, maweibin, Mihai Budiu, Mingcan Wang, Niels Pardon, Norman Jordan, Oliver Lee, Paul Jackson, Ran Tao, Rob D’Hondt, Ruben Quesada Lopez, Sergey Nuyanzin (release manager), Stamatis Zampetakis, Tanner Clary, Tim Nieradzik, TJ Banghart, Ulrich Kramer, Will Noble, xinqiu.hu, Yingyu Wang, YiwenWu, Yubin Li, Zhengqiang Duan, zhujiang, zstan.
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 19; Guava versions 21.0 to 32.1.3-jre; other software versions as specified in gradle.properties.
Breaking Changes
- In the context of
[CALCITE-6015]
the visibility of the method
SqlCall.getCallSignaturehas been converted fromprotectedtopublic. Any subclass overriding it will need to be adjusted accordingly. - [CALCITE-6321]
Add
copy(List<RexLiteral>)method toWindowclass - As a consequence of the support for lambda expressions
([CALCITE-3679])
new methods have been added to
RexVisitorandRexBiVisitor; any class implementing one of them will have to implement the new methods.
New features
- Supporting new functions
- [CALCITE-6205]
Add
BITAND_AGG,BITOR_AGGfunctions (enabled in Snowflake library) - [CALCITE-6156]
Add
ENDSWITH,STARTSWITHfunctions (enabled in Postgres, Snowflake libraries) - [CALCITE-6116]
Add
EXISTSfunction (enabled in Spark library) - [CALCITE-6182]
Add
LENGTH/LENfunctions (enabled in Snowflake library) - [CALCITE-6224]
Add
LOG2function (enabled in MySQL, Spark library) - [CALCITE-6223]
Add
MAP_CONTAINS_KEYfunction (enabled in Spark library) - [CALCITE-6314]
Add
RANDOMfunction (enabled in Postgres library) - [CALCITE-6315]
Support Postgres
TO_CHAR,TO_DATE,TO_TIMESTAMP - [CALCITE-6278]
Add
REGEXP,REGEXP_LIKEfunction (enabled in Spark library) - [CALCITE-6309]
Add
REGEXP_LIKEfunction (enabled in MySQL, Oracle, Postgres and Spark libraries) - [CALCITE-6179]
Support
WEEKOFMONTHfunction format and add test
- [CALCITE-6205]
Add
- [CALCITE-6215] Support century format datetime/timestamp in pg
- [CALCITE-6268]
Support implementing custom
JdbcSchema - [CALCITE-6255]
Support BigQuery-style
JSON_OBJECTinvocation syntax - [CALCITE-6219] ‘Must-filter’ columns
- [CALCITE-2980]
Implement the
FORMATclause of theCASToperator - [CALCITE-3679] Allow lambda expressions in SQL queries
- [CALCITE-3329] Implement osquery for OS adapter
- [CALCITE-2040] Create adapter for Apache Arrow
- [CALCITE-6257] StarRocks dialect implementation
- [CALCITE-6254]
Support table function calls in
FROMclause withoutTABLE()wrapper - [CALCITE-6138]
Add parser support for
TIME WITH TIME ZONEandTIMESTAMP WITH TIME ZONEas a data type
Dependency version upgrade
- [CALCITE-6124] Bump json-path from 2.7.0 to 2.8.0
- [CALCITE-6229] Bump json-path from 2.8.0 to 2.9.0
- [CALCITE-6378] Bump Redis Docker image from 2.8.19 to 7.2.4
- [CALCITE-6356] Upgrade Calcite to Avatica 1.25.0
- [CALCITE-6243] Upgrade Cassandra to 4.1.3 and DataStax driver for Cassandra to 4.17.0
- [CALCITE-6181] Upgrade Janino from 3.1.9 to 3.1.11
- [CALCITE-6119] Upgrade testcontainers to 1.19.3
- [CALCITE-6081] Remove bouncycastle dependency
Bug-fixes, API changes and minor enhancements
- [CALCITE-6355]
RelToSqlConverter[ORDER BY]generates an incorrect order by whenNULLS LASTis used in non-projected field - [CALCITE-6210]
Cast to
VARBINARYcauses an assertion failure - [CALCITE-5289]
Assertion failure in
MultiJoinOptimizeBushyRule - [CALCITE-6345] Intervals with more than 100 years are not supported
- [CALCITE-6265] Type coercion is failing for numeric values in prepared statements (follow-up)
- [CALCITE-6248] Illegal dates are accepted by casts
- [CALCITE-6282]
Avatica ignores time precision when returning
TIMEresults - [CALCITE-6338]
RelMdCollation#projectcan return an incomplete list of collations in the presence of aliasing - [CALCITE-5976]
Function
ARRAY_PREPEND/ARRAY_APPEND/ARRAY_INSERTgives exception when inserted element type not equals array component type - [CALCITE-6349]
CoreRules.PROJECT_REDUCE_EXPRESSIONScrashes on expressions withARRAY_REPEAT - [CALCITE-6333]
NullPointerExceptioninAggregateExpandDistinctAggregatesRule.doRewritewhen rewriting filtered distinct aggregation - [CALCITE-6285]
Function
ARRAY_INSERTproduces an incorrect result for negative indices - [CALCITE-6015]
AssertionErrorduring optimization ofEXTRACTexpression - [CALCITE-6317]
Incorrect constant replacement when group keys are
NULL - [CALCITE-6348]
ARRAY_OVERLAPwith aNULLargument crashes the compiler - [CALCITE-6347]
ARRAY_REPEATwith a string argument causes a compiler crash - [CALCITE-6127]
The spark array function gives
NullPointerExceptionwhen element is row type - [CALCITE-6074]
The size of
REAL,DOUBLE, andFLOATis not consistent - [CALCITE-6115] Interval type specifier with zero fractional second precision does not pass validation
- [CALCITE-5955]
BigQuery
PERCENTILEfunctions are unparsed incorrectly - [CALCITE-6048]
ServerTest#testTruncateTablefails intermittently due to method not found exception - [CALCITE-5811] Error messages produced for constant out-of-bounds arguments are confusing
- [CALCITE-6128]
RelBuilder.limitshould apply offset and fetch to previous Sort operator, if possible - [CALCITE-6118]
Missing empty
ARRAYfunction usage in reference doc - [CALCITE-6121]
Invalid unparse for
TIMESTAMPwithSparkSqlDialect - [CALCITE-6109]
Linq4j
OptimizeShuttleshould not create new instances ofTernaryExpressionif it does not do any optimization - [CALCITE-6095]
Arithmetic expression with
VARBINARYvalue causes AssertionFailure - [CALCITE-6150]
JDBC adapter for ClickHouse generates incorrect SQL for certain units in the
EXTRACTfunction - [CALCITE-6117]
Converting
SAFE_CASTfromRexCalltoSqlCallfails to add the type as an argument - [CALCITE-6211]
SUBSTRINGwithInteger.MIN_VALUEas a second parameter raise unexpected exception - [CALCITE-6213]
The default behavior of
NullCollationin Presto isLAST - [CALCITE-6227]
ELEMENT(NULL)causes an assertion failure - [CALCITE-6168]
RexExecutorcan throw during compilation - [CALCITE-5130]
AssertionError: “Conversion to relational algebra failed to preserve datatypes” when unionVARCHARliteral andCAST(null AS INTEGER) - [CALCITE-6178]
WITH RECURSIVEquery when cloned usingSqlShuttleloosesRECURSIVEproperty - [CALCITE-6332]
Optimization
CoreRules.AGGREGATE_EXPAND_DISTINCT_AGGREGATES_TO_JOINproduces incorrect results for aggregates with groupSets - [CALCITE-6353]
Optimization
CoreRules.PROJECT_REDUCE_EXPRESSIONScrashes while optimizingARRAY_CONCATexpression - [CALCITE-6262]
CURRENT_TIMESTAMP(P)ignoresDataTypeSystem#getMaxPrecision - [CALCITE-6283]
Function
ARRAY_APPENDwith aNULLarray argument crashes withNullPointerException - [CALCITE-6306]
JDBC adapter should not generate
FILTER(WHERE) in MySQL and StarRocks dialect - [CALCITE-5893]
Wrong
NULLoperand behavior ofARRAY_CONTAINS/ARRAY_EXCEPT/ARRAY_INTERSECTin Spark library - [CALCITE-6290]
Incorrect return type for BigQuery
TRUNC - [CALCITE-6252]
BigQuery
FORMAT_DATEuses the wrong calendar for Julian dates - [CALCITE-6214]
Remove
DISTINCTin aggregate function if field is unique - [CALCITE-6258]
Map value constructor is unparsed incorrectly for
PrestoSqlDialect - [CALCITE-6249]
RelNode::estimatedRowCountshould not be used incomputeSelfCost - [CALCITE-6251]
InnerEnumeratorinEnumerableDefaults::correlateBatchJoinis not closed - [CALCITE-6247]
BigQuery
FORMAT_DATEfunction handles incorrectly the%eformat specifier - [CALCITE-6238]
Exception while evaluating
ROUND/TRUNCATEfunctions - [CALCITE-6228]
ELEMENTfunction infers incorrect return type - [CALCITE-5647]
RelMdPopulationSizeshould usemq.getRowCount(rel)instead ofrel.estimateRowCount(mq) - [CALCITE-6241] Enable a few existing functions to Spark library
- [CALCITE-6094]
Linq4j.ConstantExpression.writecrashes on special FP values - [CALCITE-6190] Incorrect precision derivation for negative numeric types
- [CALCITE-6202]
sqlshdoes not print error message when query fails - [CALCITE-6200]
RelJsonthrowUnsupportedOperationExceptionforRexDynamicParam - [CALCITE-6044]
RelMetadataQueryshould regard single-row relational expressions as unique - [CALCITE-5846]
Preserve filters on non-distinct aggCalls in
AggregateExpandWithinDistinctRule - [CALCITE-6100]
The
equalsDeepofSqlRowTypeNameSpecshould useequalsDeepfor fieldTypes rather than reference comparison - [CALCITE-6183]
The second parameter of
RexProgramBuilder#registerInternalis always false - [CALCITE-6149]
Unparse for
CASTNullable withClickHouseSqlDialect - [CALCITE-5649]
Get row count statistics from
ReflectiveSchema - [CALCITE-6220]
Rewrite
MIN/MAX(bool)asBOOL_AND/BOOL_ORfor Postgres, Redshift - [CALCITE-6321]
Add
copy(List<RexLiteral>)method to Window class - [CALCITE-6337] Distinguish naked measure support between inside and outside aggregation
- [CALCITE-6323]
Serialize return type during
RelJson.toJson(RexNode node)forSqlKind.SAFE_CAST - [CALCITE-6111] Explicit cast from expression to numeric type doesn’t check overflow
- [CALCITE-6162] Add rule(s) to remove joins with constant single tuple relations
- [CALCITE-6192]
DEFAULTexpression withNULLvalue throws unexpected exception - [CALCITE-6147]
CAST(CAST(EMPNO AS VARCHAR) AS INT)should be simplified toEMPNO - [CALCITE-6102]
SqlWriterinSqlInsert’s unparse start a list but does not end it - [CALCITE-5607]
Serialize return type during
RelJson.toJson(RexNode node)forSqlKind.MINUS - [CALCITE-6269] Fix missing/broken BigQuery date-time format elements
- [CALCITE-6231]
JDBC adapter generates
UNNESTwhen it should generateUNNEST ... WITH ORDINALITY - [CALCITE-6208]
Update
JSON_VALUEreturn type inference to make explicit array return types be nullable with nullable elements - [CALCITE-6199]
Trim unused fields for
SNAPSHOTandSAMPLEif table hasVIRTUALcolumn - [CALCITE-6063]
If
ARRAYsubquery hasORDER BY(withoutLIMIT), rows are not sorted - [CALCITE-6032]
Multilevel correlated query is failing in
RelDecorrelatorcode path
Build and test suite
- [CALCITE-6103] Use eclipse-temurin image to build and publish javadocs for the website
- [CALCITE-6131]
There are duplicate sample tests in
SqlTypeUtilTest - [CALCITE-6125] Automate generation of contributor names in release notes by adding a git mailmap file
- [CALCITE-6165]
Add
DATE_ADDtest andDATE_DIFFtest onSqlOperatorTest - [CALCITE-6184]
Add
checkNullTestonSqlOperatorTest - [CALCITE-6187]
Linter should disallow tags such as
[MINOR]in commit messages - [CALCITE-6273]
Add sqrt negative test in
SqlOperatorTest - [CALCITE-6189]
Improve
FormatElementEnumTest - [CALCITE-6234]
Add tests on
SqlOperatorTestforto_charfunction - [CALCITE-6172] Allow aliased operators to re-use existing tests
- [CALCITE-6359] Update GitHub Actions workflows to use docker compose v2
- [CALCITE-6092]
Skip breaking
CASTString toTIMEtests until fixed in Avatica 1.24.0 - [CALCITE-6384]
Add ASF header to
buildcache.yml,gradle-wrapper-validation.yml - [CALCITE-6385] LintTest fails when run in source distribution
- [CALCITE-6387] Make Arrow adapter passing tests with jdk17+
- [CALCITE-6390] Exclude Arrow project on Windows builds
Web site and documentation
- Site: Switch PMC Chair to Benchao Li
- Site: Troubleshooting/Website publishing improvements in release guide
- Site: Remove committer by request process
- [CALCITE-6083] On web site, ensure contributors file is sorted
- [CALCITE-6098]
Update
LICENSEandNOTICEfor Jekyll website template - [CALCITE-6250] Limitations of MongoDB adapter are not documented
- [CALCITE-6256] Incorrect rendering of HTML on InnoDB adapter page
- Add
.gitignoreand.ratignorefor jenv - [CALCITE-6097]
Gridism CSS dependency is mispelled in
LICENSE - [CALCITE-6096]
Remove obsolete html5shiv and respond entries from
LICENSE - [CALCITE-6194] Contributor rules do not give instructions about how to quote commits
- [CALCITE-6212]
Config
locale = 'en_US'for javadoc task - [CALCITE-6316]
Update Javadoc for
RelWriterTest#testDeserializeMinusDateOperator - [CALCITE-6105]
Documentation does not specify the behavior of
SPLITfunction for empty string arguments
1.36.0 / 2023-11-10
This release comes 3 months after 1.35.0, contains contributions from 30 contributors, and resolves 125 issues.
Among other new features, it’s worth highlighting the adding of 30 new
SQL functions in various libraries such as BigQuery and Spark, many
improvements hardening TABLESAMPLE, and also the following features:
- [CALCITE-129]
Support recursive
WITHqueries - [CALCITE-6022]
Support
CREATE TABLE ... LIKE DDLin server module - [CALCITE-5962]
Support parse Spark-style syntax
LEFT ANTI JOINin Babel parser - [CALCITE-5184]
Support
LIMIT start, ALLin MySQL conformance, equivalent toOFFSET start - [CALCITE-5889]
Add a
RelRulethat convertsMinusintoUNION ALL..GROUP BY...WHERE
In addition to new features, it’s also worth highlighting the integrating of SQL Logic Test suite.
Contributors to this release: Benchao Li (release manager), Cancai Cai, Claude Brisson, Evgeniy Stanilovskiy, Hanumath Maduri, Hongyu Guo, Itiel Sadeh, Jerin John, Jiajun Xie, Julian Hyde, Kaustubh Beedkar, Lei Shen, Leonid Chistov, Michael Mior, Mihai Budiu, Mingcan Wang, Oliver Lee, Ran Tao, Ruben Quesada Lopez, Runkang He, Tanner Clary, Thomas Rebele, Tim Nieradzik, Wang Zhao, Wegdan Ghazi, Wenrui Meng, Xiaogang Zhou, ZhangJian He, Zhengqiang Duan, Zoltan Haindrich.
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 19; Guava versions 21.0 to 32.1.3-jre; other software versions as specified in gradle.properties.
Breaking Changes
None.
New features
- Supporting new SQL functions in BigQuery, Hive and Spark libraries:
- [CALCITE-5826]
Add
FIND_IN_SETfunction (enabled in Hive and Spark libraries) - [CALCITE-5979]
Enable
REGEXP_REPLACEfunction in BigQuery library - [CALCITE-6077]
Add
FACTORIALfunction (enabled in Hive and Spark libraries) - [CALCITE-5918]
Add
MAPfunction (enabled in Spark library) - [CALCITE-5825]
Add
URL_ENCODEandURL_DECODEfunction (enabled in Spark library) - [CALCITE-6021]
Add
CURRENT_DATETIMEfunction (enabled in BigQuery library) - [CALCITE-5993]
Add
CODE_POINTS_TO_STRING,TO_CODE_POINTSfunction (enabled in BigQuery library) - [CALCITE-5978]
Add
REGEXP_INSTRfunction (enabled in BigQuery library) - [CALCITE-5935]
Add
CODE_POINTS_TO_BYTESfunction (enabled in BigQuery library) - [CALCITE-5933]
Add
SAFE_DIVIDEfunction (enabled in BigQuery library) - [CALCITE-5821]
Add
FORMAT_NUMBERfunction (enabled in Hive and Spark library) - [CALCITE-5911]
Add
REGEXP_EXTRACT_ALLfunction (enabled in BigQuery library) - [CALCITE-5910]
Add
REGEXP_EXTRACTandREGEXP_SUBSTRfunctions (enabled in BigQuery library) - [CALCITE-5766]
Add
SAFE_NEGATEfunction (enabled for BigQuery library) - [CALCITE-5770]
Add
SAFE_SUBTRACTfunction (enabled in BigQuery library) - [CALCITE-5848]
Add
BIT_GETandGETBITfunctions (enabled in Spark library) - [CALCITE-5644]
Add
CONTAINS_SUBSTRfunction (enabled in BigQuery library) - [CALCITE-5640]
Add
SAFE_ADDfunction (enabled in BigQuery library) - [CALCITE-5830]
Add
ARRAY_INSERTfunction(enabled in Spark library) - [CALCITE-5873]
Add
REGEXP_CONTAINSfunction (enabled in BigQuery library) - [CALCITE-5827]
Add
IS_INFandIS_NANfunctions (enabled in BigQuery library) - [CALCITE-5831]
Add
SOUNDEXfunction (enabled in Spark library) - [CALCITE-5735]
Add
SAFE_MULTIPLYfunction (enabled for BigQuery) - [CALCITE-5820]
Add
PARSE_URLfunction (enabled in Hive and Spark library) - [CALCITE-5851]
Add
LEVENSHTEINfunction (enabled in Hive and Spark library)
- [CALCITE-5826]
Add
- [CALCITE-129]
Support recursive
WITHqueries - [CALCITE-6011]
Add
FilterWindowTransposeRuleto push aFilterpast aWindow - [CALCITE-6038]
Remove
ORDER BY ... LIMIT nwhen input has at most one row, n >= 1, and there is noOFFSETclause - [CALCITE-6022]
Support
CREATE TABLE ... LIKE DDLin server module - [CALCITE-6031]
Add the planner rule that pushes
FilterpastSample - [CALCITE-4189]
Simplify
p OR (p IS NOT TRUE)toTRUE - [CALCITE-6009]
Add optimization to remove redundant
LIMITthat is more than input row count - [CALCITE-5570]
Support nested map type for
SqlDataTypeSpec - [CALCITE-5962]
Support parse Spark-style syntax
LEFT ANTI JOINin Babel parser - [CALCITE-5940]
Add a
RelRuleto mergeLimit - [CALCITE-5971]
Add
SampleToFilterRuleto rewrite bernoulliSampletoFilter - [CALCITE-5994]
Add optimization rule to remove
Sortwhen its input’s row number is less or equal to one - [CALCITE-5836]
Implement Rel2Sql for
MERGE - [CALCITE-5889]
Add a
RelRulethat convertsMinusintoUNION ALL..GROUP BY...WHERE - [CALCITE-5944]
Add metadata for
Sample - [CALCITE-5941]
Support
LITERAL_AGGinInterpreter - [CALCITE-985]
Validate
MERGE - [CALCITE-5870]
Allow literals like
DECIMAL '12.3'(consistent with Postgres) - [CALCITE-5916]
In
RelBuilder, addsample()method (equivalent to SQLTABLESAMPLEclause) - [CALCITE-5184]
Support
LIMIT start, ALLin MySQL conformance, equivalent toOFFSET start
Dependency version upgrade
- [CALCITE-5763] Increase minimum Guava version to 21.0, maximum version to 32.1.3-jre, and stop building on Guava 19.0
- [CALCITE-5938] Update HSQLDB to Version 2.7.2 (using JDK8 JAR, default supports JDK11+)
- [CALCITE-6004] Replace deprecated mongo-java-driver dependency
- [CALCITE-5966] Upgrade commons-dbcp2 to 2.9.0
Bug-fixes, API changes and minor enhancements
- [CALCITE-6088]
SqlItemOperatorfails inRelToSqlConverter - [CALCITE-5863]
Calcite rejects valid query with multiple
ORDER BYcolumns and constantRANGEbounds in window functions - [CALCITE-5984]
Allow disabling field trimming in
PrepareviaSqlToRelConverter.Config#isTrimUnusedFields - [CALCITE-5990] Explicit cast to numeric type doesn’t check overflow
- [CALCITE-6052]
SqlImplementorwritesREAL,FLOAT, orDOUBLEliterals asDECIMALliterals - [CALCITE-6041]
MAPsub-query givesNullPointerException - [CALCITE-6037]
The function category of
ARRAY/EXTRACT_VALUE/XML_TRANSFORM/EXTRACT_XML/EXISTSNODEis incorrect - [CALCITE-6024]
A more efficient implementation of
SqlOperatorTable, backed by an immutable multi-map keyed by upper-case operator name - [CALCITE-5949]
RexExecutableshould return unchanged original expressions when it fails - [CALCITE-6013]
RelBuildershould simplify plan by pruning unused measures - [CALCITE-6040]
The operand type inference of
SqlMapValueConstructoris incorrect - [CALCITE-6030]
DATE_PARTis not handled by theRexToLixTranslator - Following
[CALCITE-5570]
Support nested map type for
SqlDataTypeSpec - [CALCITE-6050]
Add interface
ImmutablePairList - [CALCITE-5950]
DEFAULTexpression is ignored duringINSERT - [CALCITE-6006]
RelToSqlConverterloses charset information - [CALCITE-5948]
Use explicit casting if element type in
ARRAY/MAPdoes not equal derived component type - [CALCITE-5989]
Type inference for
RPADandLPADfunctions (BIGQUERY) is incorrect - [CALCITE-5982]
Allow implementations of
CalciteMetato return extra columns in their responses toDatabaseMetaData.getTablesandgetColumnsrequests - [CALCITE-6007]
Sub-query that contains
WITHand has no alias generates invalid SQL after expansion - [CALCITE-6003]
JSON_ARRAY()with no arguments does not unparse correctly - [CALCITE-6026]
MongoDB: Column is not quoted in
ORDER BYclause and throws JsonParseException - [CALCITE-6005]
POLYGONstring representation is different on Apple silicon - [CALCITE-5974]
Elasticsearch adapter throws
ClassCastExceptionwhen index mapping setsdynamic_templateswithoutproperties - [CALCITE-5995]
JSON_VALUE,JSON_EXISTS,JSON_QUERYfunctions should cache generated objects between calls - [CALCITE-5960]
CASTthrows NullPointerException ifSqlTypeFamilyof targetType is null - [CALCITE-5997]
OFFSEToperator is incorrectly unparsed - [CALCITE-5961]
Type inference of
ARRAY_COMPACTis incorrect - [CALCITE-5999]
DECIMALliterals as sometimes unparsed looking asDOUBLEliterals - [CALCITE-5988]
SqlImplementor.toSqlcannot emitVARBINARYliterals - [CALCITE-5996]
TRANSLATEoperator is incorrectly unparsed - [CALCITE-5862]
Incorrect semantics of
ARRAYfunction (Spark library) when elements have Numeric and Character types - [CALCITE-5931]
Allow round decimals like
1.00in window ranges - [CALCITE-5732]
EnumerableHashJoinandEnumerableMergeJoinon composite key return rows matching conditionNULL = NULL - [CALCITE-5967]
UnsupportedOperationExceptionwhile implementing a call that requires a special collator - [CALCITE-5952]
SemiJoinJoinTransposeRuleshould check if JoinType supports pushing predicates into its inputs - [CALCITE-5953]
AggregateCaseToFilterRulemay make inaccurateSUMtransformations - [CALCITE-5861]
ReduceExpressionsRulerules should constant-fold expressions in window bounds - [CALCITE-5965]
Avoid unnecessary String concatenations in the
RexFieldAccessconstructor to improve the performance - [CALCITE-5914] Cache compiled regular expressions in SQL function runtime
- Refactor: In
ReflectUtil, add methods isStatic and isPublic - Refactor: In
RexImpTable, ensure that every method is in BuiltInMethod - [CALCITE-5922]
The SQL generated for the
POSITIONfunction(with 3 input arguments) by theSparkSqlDialectis not recognized by Spark SQL - [CALCITE-5920]
Reset
PERCENTILE_CONT/PERCENTILE_DISCto reserved keywords - [CALCITE-5946]
TimeStringshould allow fractional seconds ending in zero - [CALCITE-5906]
JDBC adapter should generate
TABLESAMPLE - [CALCITE-5895]
TABLESAMPLE (0)should return no rows - [CALCITE-5813]
Type inference for sql functions
REPEAT,SPACE,XML_TRANSFORM, andXML_EXTRACTis incorrect - [CALCITE-5908]
Refactor: Remove unnecessary null checks in
CalciteSchema - [CALCITE-5843] Constant expression with nested casts causes a compiler crash
- [CALCITE-5885]
SqlNode#toSqlString()does not honor dialect’ssupportsCharSet()flag on nested types - [CALCITE-5869]
LEAST_RESTRICTIVEdoes not use inner type ofMEASUREfor comparisons - [CALCITE-5903]
RelMdCollationdoes not define collations forEnumerableLimit - [CALCITE-5882]
Compile-time evaluation of
SPLITfunction returns incorrect result - [CALCITE-5879]
AssertionErrorduring constant reduction ofSPLITexpression that returns null - [CALCITE-5875] Remove unnecessary null checks in Redis adapter
- [CALCITE-5859]
Compile-time evaluation of
LEFT(NULL, n)should not throwRuntimeException - [CALCITE-5837]
RexUtil#pullFactorsoutput’s order should be deterministic even when theRexNodekind isOR - [CALCITE-5877]
AssertionErrorduringMODoperation if result scale is greater than maximum numeric scale - [CALCITE-5841]
Improve singleton implementation for
ChinookAvaticaServerin calcite-plus - Following [CALCITE-5688] Eliminate warnings in server parser
Build and test suite
- [CALCITE-5921]
SqlOperatorFixture.checkFailsandcheckAggFailsdon’t check runtime failure - [CALCITE-5923]
SqlOperatorTestusingsafeParametersare not using overridable fixture - [CALCITE-6014]
Create a
SqlOperatorFixturethat parses, unparses, and then parses again before executing - Incorrect test fixture used by
SqlOperatorTest.testLeastFunc - [CALCITE-5980] QuidemTests are not effectively executed on Windows
- [CALCITE-5615] Run SQL Logic Test suite using Calcite’s HSQLDB JDBC adapter
- [CALCITE-5909]
SqlParserTest.testNoUnintendedNewReservedKeywordsfails in IDE while passes in command line - Refactor
RelDataTypeSystemTestto use test fixture - Add various lint checks
- Code style: lint
- In
Puffin, allow an action to test whether it is looking at the last line of a source
Web site and documentation
- Site: Add Runkang He as committer
- Site: Add Hongyu Guo as committer
- Site: Add Lei Shen as committer
- Site: Add Ran Tao as committer
- Site: Add Mihai Budiu as committer
- Site: Add Apache Wayang (incubating) to powered-by page
- [CALCITE-5884]
ARRAY_TO_STRINGfunction should returnNULLif itsnullValueargument isNULL - [CALCITE-6075] Site: Cloning source code from GitHub using git protocol fails
- Add example for
MAPtype in reference docs - [CALCITE-6033] Correct broken links on adapter page
- [CALCITE-6017] Update the GitHub link of released versions
- [CALCITE-5905]
Documentation for
CREATE TYPEis incorrect - Remove mentions of binary distribution from README
- Update broken link in
RelMetadataProviderJavadoc - The parameter names of
SqlTypeMappingRules.Builder#addare misleading
1.35.0 / 2023-07-26
This release comes 4 months after 1.34.0, contains contributions from 36 contributors, and resolves 140 issues.
Among other new features, it adds more than 40 new SQL functions in various libraries such as BigQuery and Spark.
It is worth highlighting the following improvements:
- Some improvements in calcite core.
- [CALCITE-5703] Reduce amount of generated runtime code
- [CALCITE-5479]
FamilyOperandTypeCheckeris not readily composable in sequences - [CALCITE-5425] Should not pushdown Filter through Aggregate without group keys
- [CALCITE-5506]
RelToSqlConvertershould retain the aggregation logic when Project withoutRexInputRefon the Aggregate
- Some improvements in simplifying an expression.
- [CALCITE-5769]
Optimizing
CAST(e AS t) IS NOT NULLtoe IS NOT NULL - [CALCITE-5780]
Simplify
1 > x OR 1 <= x OR x IS NULLtoTRUE - [CALCITE-5798]
Improve simplification of
(x < y) IS NOT TRUEwhen x and y are not nullable - [CALCITE-5759]
SEARCH(1, Sarg[IS NOT NULL])should be simplified toTRUE - [CALCITE-5639]
RexSimplifyshould removeIS NOT NULLcheck whenLIKEcomparison is present
- [CALCITE-5769]
Optimizing
Contributors to this release: Adam Kennedy, Aitozi, Akshay Dayal, Benchao Li, Charles Givre, Clay Johnson, Dmitry Sysolyatin, Evgeny Stanilovsky, Feng Guo, Gian Merlino, Guillaume Massé, Hongyu Guo, Ian Bertolacci, Itiel Sadeh, Jacky Lau, Jiajun Xie, Jiang Zhu Joey Moore, Julian Hyde, Lei Zhang, Leonid Chistov, Mihai Budiu, NobiGo (release manager), Oliver Lee, Ran Tao, Roman Kondakov, Ruben Quesada Lopez, Runkang He, Sergey Nuyanzin, Stamatis Zampetakis, TJ Banghart, Tanner Clary, Tim Nieradzik, Will Noble, Zhe Hu, Zou Dan.
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 19; Guava versions 16.0.1 to 31.1-jre; other software versions as specified in gradle.properties.
Breaking Changes
- [CALCITE-5823] Remove commons-collections dependency from innodb.
- The way of Locale parsing changed within [CALCITE-5746] Now locale’s language tag should match IETF BCP 47 language tag or be empty.
- [CALCITE-5477] Build with Guava 19.0.
New features
- Supporting new SQL functions in BigQuery:
- [CALCITE-5728]
Add
ARRAY_TO_STRINGfunction (enabled in BigQuery library) - [CALCITE-5476]
Add
DATETIME_TRUNCfunction (enabled in BigQuery library) - [CALCITE-5565]
Add
LOGfunction (enabled in BigQuery library) - [CALCITE-5543]
Add functions
PARSE_DATE,PARSE_DATETIME,PARSE_TIME,PARSE_TIMESTAMP(enabled in BigQuery library) - [CALCITE-5564]
Add parsing and validation for
PERCENTILE_CONT/PERCENTILE_DISCfunctions (enabled in BigQuery) - [CALCITE-5557]
Add
SAFE_CASTfunction (enabled in BigQuery library) - [CALCITE-5580]
Add
SPLITfunction (enabled in BigQuery library) - [CALCITE-5709]
Add
TO_BASE32andFROM_BASE32functions (enabled in BigQuery library) - [CALCITE-5782]
Add
TO_HEXandFROM_HEXfunctions (enabled in BigQuery library) - [CALCITE-5660]
Add array subscript operators
OFFSET,ORDINAL,SAFE_OFFSET,SAFE_ORDINAL(enabled in BigQuery library)
- [CALCITE-5728]
Add
- Supporting new SQL functions in Spark:
- [CALCITE-5624]
Add
ARRAYfunction (enabled in Spark library) - [CALCITE-5751]
Add
ARRAY_APPEND,ARRAY_POSITION,ARRAY_REMOVE,ARRAY_PREPENDfunction (enabled in Spark library) - [CALCITE-5707]
Add
ARRAY_CONTAINSfunction (enabled in Spark library) - [CALCITE-5734]
Add
ARRAY_COMPACTfunction (enabled in Spark library) - [CALCITE-5704]
Add
ARRAY_EXCEPT,ARRAY_INTERSECT,ARRAY_UNIONfunction (enabled in Spark library) - [CALCITE-5657]
Add
ARRAY_DISTINCTfunction (enabled in Spark library) - [CALCITE-5778]
Add
ARRAY_JOIN,ARRAYS_OVERLAP,ARRAYS_ZIPfunction (enabled in Spark library) - [CALCITE-5710]
Add
ARRAY_MAX,ARRAY_MINfunction (enabled in Spark library) - [CALCITE-5700]
Add
ARRAY_SIZE,ARRAY_REPEATfunction (enabled in Spark library) - [CALCITE-5822]
Add
BIT_LENGTHfunction (enabled in Spark library) - [CALCITE-5772]
Add
MAP_CONCAT,MAP_FROM_ENTRIESfunction (enabled in Spark library) - [CALCITE-5714]
Add
MAP_ENTRIESfunction (enabled in Spark library) - [CALCITE-5744]
Add
MAP_FROM_ARRAYS,STR_TO_MAPfunction (enabled in Spark library) - [CALCITE-5695]
Add
MAP_KEYS,MAP_VALUESfunction (enabled in Spark library) - [CALCITE-5738]
Add
SORT_ARRAYfunction (enabled in Spark library)
- [CALCITE-5624]
Add
- Supporting new SQL functions in BigQuery, MSSql, MySQL, Oracle and Postgres:
- [CALCITE-5548]
Add MSSQL-style
CONVERTfunction (enabled in MSSql library) - [CALCITE-5741]
Add
CONCAT_WSfunction (enabled in MSSQL, MySQL, Postgres libraries) - [CALCITE-3959]
Add
INSTRfunction (enabled in BigQuery, MySQL, Oracle libraries) - [CALCITE-5642]
Add
SHA256,SHA512functions (enabled in BigQuery and Postgres libraries) - [CALCITE-5585]
Add
STRPOSfunction (enabled in BigQuery, Postgres libraries) - [CALCITE-5619]
Add
TO_CHAR(<TIMESTAMP>, <STRING>)function (enabled in MySQL, Oracle, Postgres libraries) - [CALCITE-4771]
Add
TRY_CASTfunction (enabled in MSSQL library)
- [CALCITE-5548]
Add MSSQL-style
- [CALCITE-5761]
Allow
DECADE,CENTURY, andMILLENNIUMtime units inDATE_TRUNC,TIMESTAMP_TRUNC,DATETIME_TRUNCfunctions - [CALCITE-5783]
Support hint for
TableFunctionScan - [CALCITE-5593] Elasticsearch adapter should support aliases
- [CALCITE-5411]
SparkSqlDialectshould supportROLLUPandCUBEaggregate functions - [CALCITE-5664]
Add
CONVERT(string USING transcodingName)function, also known as TRANSLATE - [CALCITE-5610]
Add
COTH,CSCH,SECHfunctions - [CALCITE-111]
Support
CONVERTfunction, for changing character sets - [CALCITE-5606]
Add
SqlLibrary.ALL - [CALCITE-5746] Support JDK 19
- [CALCITE-5662]
Allow
CAST(BOOLEAN as INTEGER)(if enabled by conformance) - [CALCITE-4334]
LITERAL_AGG, an internal aggregate function that returns a constant value - [CALCITE-5688]
Support
TRUNCATE TABLEDDL statement in server parser - [CALCITE-5711]
Implement the
SINGLE_VALUEaggregation in Postgres Dialect - [CALCITE-5608]
Implement
ASINH,ACOSH,ATANHfunctions - [CALCITE-5602]
Implement
CSCandSECfunctions - [CALCITE-5367] Implement spatial type functions
- [CALCITE-5160]
ANY/SOME,ALLoperators should support collection expressions - [CALCITE-5403]
Babel parser should parse Postgres’s
SET,RESET,BEGIN,SHOW,ROLLBACK,COMMITcommands
Dependency version upgrade
- [CALCITE-5440] Bump gradle from 7.4.2 to 7.6.1
- [CALCITE-5361] Update janino from 3.1.8 to 3.1.9
- [CALCITE-5587] Upgrade geode-core from 1.10.0 to 1.15.1
- [CALCITE-5819] Upgrade commons-collections from 3.x to 4.4
- Upgrade Jackson from 2.14.1 to 2.15.0
- Bump vlsi-release-plugins from 1.84 to 1.90
Bug-fixes, API changes and minor enhancements
- [CALCITE-5747]
Conflicting
FLOORreturn type between Calcite and BigQuery - [CALCITE-5865]
ClassCastException with
FLOORandCEILon conformances that are not builtin - [CALCITE-5779] Implicit column alias for single-column table function should work
- [CALCITE-5788] Order of metadata handler methods is inconsistent in different java versions
- [CALCITE-5790]
Validator should disallow a query with * but no
FROMclause - [CALCITE-5771]
Apply two different
NULLsemantics forCONCATfunction (enabled in MySQL, Postgres, BigQuery and MSSQL) - [CALCITE-5759]
SEARCH(1, Sarg[IS NOT NULL])should be simplified toTRUE - [CALCITE-5425] Should not pushdown Filter through Aggregate without group keys
- [CALCITE-5745]
CONCATfunction (enabled in Oracle library) should only returnNULLwhen both arguments areNULL - [CALCITE-5755]
In
Sarg, allowTimestampStringvalues to be serialized to/from JSON - [CALCITE-5767]
JDBC adapter for MSSQL adds
GROUPINGtoORDER BYclause twice when emulatingNULLS LAST - [CALCITE-5381]
Add
convertCorrelateToJoinconfig property toRelBuilder - [CALCITE-5554]
In
EXTRACTfunction, addDAYOFWEEKandDAYOFYEARas synonyms forDOW,DOY - [CALCITE-5506]
RelToSqlConvertershould retain the aggregation logic when Project withoutRexInputRefon the Aggregate - [CALCITE-5680]
Wrong plan for multiple
INsub-queries with only literal operands - [CALCITE-5547]
JOIN USINGreturns incorrect column names - [CALCITE-5653]
SELECT DISTINCTaggregate function withORDER BYgives invalid validation error - [CALCITE-5621] Allow user-defined type declarations (UDTs) in the root of the JSON catalog
- [CALCITE-5530]
RelToSqlConverter[ORDER BY]generates an incorrect field alias when 2 projection fields have the same name - [CALCITE-5679]
HepPlanner#buildFinalPlan: do not clear metadata cache if RelNode has not changed - [CALCITE-5614]
Serialize
Sargvalues to and from JSON - [CALCITE-4698]
Result type of datetime ‘+’ operators and
TIMESTAMPADDfunction should be the same as the operand type - [CALCITE-5671] Add option to disable SSL certificate validation to ES adapter
- [CALCITE-5675] Infer predicates for anti-join
- [CALCITE-5639]
RexSimplifyshould removeIS NOT NULLcheck whenLIKEcomparison is present - [CALCITE-5670]
Assertion error in
SemiJoinJoinTransposeRulewhen Semi-Join has keys from both tables of the bottom Join - [CALCITE-5646]
JoinDeriveIsNotNullFilterRuleincorrectly handlesCOALESCEin join condition - [CALCITE-5563]
Reduce loops to optimize
RelSubset#getParentsandRelSubset#getParentSubsets - [CALCITE-5651] Inferred scale for decimal should not exceed maximum allowed scale
- [CALCITE-5655]
Wrong plan for multiple
IN/SOMEsub-queries with OR predicate - [CALCITE-5650]
Obtain typesystem from dialect in
RelToSqlConverterTest - [CALCITE-5648]
SqlDelegatingConformanceincorrectly delegates toSqlConformanceEnum.DEFAULT - [CALCITE-5538]
Allow creating
TimestampStringwith fractional seconds ending in 0 - [CALCITE-5605]
Add BigQuery as supported library for
CHR - [CALCITE-5571]
Remove
org.jetbrains.annotationsfrom java source code - [CALCITE-4555]
Invalid zero literal value is used for
TIMESTAMP WITH LOCAL TIME ZONEtype inRexBuilder - [CALCITE-5722]
Sarg.isComplementedPointsfails with anti-points which are equal undercompareTobut notequals - [CALCITE-5730]
Initial null values can be dropped by
EnumerableLimitSortwith offset - [CALCITE-5723] Oracle dialect generates SQL that cannot be recognized by lower version Oracle Server(<12) when unparsing OffsetFetch
- [CALCITE-5553]
RelStructuredTypeFlattenerproduces bad plan for single field struct - [CALCITE-5669]
Add rules to remove
Correlatewhen one of its inputs is empty - [CALCITE-4554]
Support
TIMESTAMP WITH LOCAL TIME ZONEforSnapshotandMatchRecognize - [CALCITE-5677]
SUBSTRsignature incorrect for BigQuery - [CALCITE-5674]
CASTexpr to target type should respect nullable when it is complex type (follow-up) - [CALCITE-5705]
Generalize
RemoveEmptySingleRuleto work with arbitrary relations and pruning configurations - [CALCITE-5668] When parsing SQL in Postgres dialect, allow unquoted table names to contain dollar sign, letters with diacritical marks and non-Latin letters
- [CALCITE-5699] Negated posix regex expressions throw NullPointerException when applied to NULL values
- [CALCITE-5691]
INsub-query insideFILTERclause throws IndexOutOfBoundsException - [CALCITE-5674]
CASTexpr to target type should respect nullable when it is complex type - [CALCITE-5698]
EXTRACTfromINTERVALshould return negative numbers if interval is negative - [CALCITE-5757]
BigQuery
DATE_TRUNCreturn type should beARG0andTIMESTAMP_TRUNC/DATETIME_TRUNCshould returnTIMESTAMPforDATE/TIMESTAMPsandTIMESTAMP_LTZforTIMESTAMP_LTZ - [CALCITE-5768]
JDBC adapter should insert a subquery for a query with
ORDER BYordinal - [CALCITE-5676]
In JDBC
DatabaseMetaData.getColumns, set DATA_TYPE and TYPE_NAME metadata values forMEASUREtypes - [CALCITE-5401]
Rule fired by
HepPlannercan return Volcano’sRelSubset - [CALCITE-5721] Capture build scans on ge.apache.org to benefit from deep build insights
- [CALCITE-5703] Reduce amount of generated runtime code
- [CALCITE-5717]
RelBuilder.projectof literals on a single-rowAggregateshould create a Values - [CALCITE-5697]
RelBuilder.convertdoes not match nullability if top of stack is a Project - [CALCITE-5839]
EnumerableInterpretable#StaticFieldDetectorcan overwrite its flag and return an incorrect result - [CALCITE-5479]
FamilyOperandTypeCheckeris not readily composable in sequences - [CALCITE-5824] Handle IndexCondition null pointQueryKey list in innodb
- [CALCITE-5769]
Optimizing
CAST(e AS t) IS NOT NULLtoe IS NOT NULL - [CALCITE-5780]
Simplify
1 > x OR 1 <= x OR x IS NULLtoTRUE - [CALCITE-5708]
SUBSTRINGvalidation error if any parameter is a NULL literal - [CALCITE-5816]
Only return left-hand table columns when validate
LEFT SEMI JOINquery - [CALCITE-5798]
Improve simplification of
(x < y) IS NOT TRUEwhen x and y are not nullable - [CALCITE-5810] Prevent overflow in substring length computation
- [CALCITE-5793]
JDBC adapter should use
NULLS FIRST,NULLS LASTsyntax for BigQuery - [CALCITE-5789] Query with two nested subqueries where the inner-most references the outer-most table returns wrong result
- Add .gitignore for Java VSCode plugin
- Refactor: In tests, pass ‘typeSystem’ connection property value via a ThreadLocal
- Refactor: In
RexImpTable, create field ‘variableName’ to implement method ‘getVariableName()’ - Refactor: Move class
AggConverterout ofSqlToRelConverter - Refactor: Use
PairList - Refactor: Make
SqlValidatorScopemandatory - Refactor: Add fields
AggregateCall.rexListandRelBuilder.AggCall.preOperands - Refactor: Add
RelNode.stripped - Refactor:
RelBuilder.variable(Holder)becomesvariable(Supplier) - Refactor: In
ImmutableBitSet, specialize forEach, and add forEachInt, anyMatch, allMatch
Build and test suite
- [CALCITE-5785] Gradle remote build caching is broken for :babel:fmppMain and :server:fmppMain tasks
- [CALCITE-5611]
In
SqlOperatorTest, show SQL for failed tests - [CALCITE-5726] Canonize use of Hamcrest matchers in test code
- [CALCITE-5765]
Add
LintTest, to apply custom lint rules to source code - [CALCITE-5773] Gradle show tasks fails when creating javadocAggregateIncludingTests
- [CALCITE-5786]
QuidemTestandDiffRepositoryare not compatible with Gradle incremental builds since they write to build/resources - [CALCITE-5574]
Break
MockCatalogReaderSimple#initinto smaller methods - [CALCITE-5727]
RelOptFixture#checkUnchangedshould assert planAfter is not present - [CALCITE-5596] Elasticsearch adapter test fails on Apple silicon
- [CALCITE-5764]
Add
Puffin - [CALCITE-5706]
Add class
PairList - [CALCITE-5762]
Create class
TestUnsafe, that contains unsafe methods used by tests - In tests, don’t allow multi-line strings as argument to CalciteAssert.returnsUnordered
- Disable JIRA worklog notifications for GitHub PRs
- Code style: Lint
- Code style: improve Javadoc
- Code style: disallow ‘))’ and ‘).’ at the start of a line
Web site and documentation
- Site: Add TJ Banghart as committer
- Site: Add Dan Zou as committer
- Site: Add Zhe Hu as committer
- Site: Add Yong Liu as committer
- Site: Add Oliver Lee as committer
- Site: Add Tanner Clary as committer
- Site: Add talks from Calcite Meetup March 2023
- Site: Clarify that SQL does not support recursive queries yet
- Site: Troubleshooting/Website publishing improvements in release guide
- Bump nokogiri from 1.13.4 to 1.14.3 in /site
- Update javadoc for
RelColumnOrigin#isDerivedmethod
1.34.0 / 2023-03-14
This release comes 1 month after 1.33.0,
contains contributions from 18 contributors, and resolves 34 issues. It’s worth highlighting the
introduction of QUALIFY clause ([CALCITE-5268]),
which facilitates filtering the results of window functions. Among other improvements and fixes, it
adds roughly 15 new functions in BigQuery library for handling dates, times, and timestamps, and
provides a fix ([CALCITE-5522])
for a small breaking change in DATE_TRUNC function
([CALCITE-5447]), which was
introduced accidentally in 1.33.0.
Contributors to this release: Alessandro Solimando, Benchao Li, Brandon Chong, Dmitry Sysolyatin, Francis Chuang, Gian Merlino, Guillaume Massé, Jiajun Xie, Julian Hyde, Moritz Mack, Oliver Lee, Peng Wang, Stamatis Zampetakis (release manager), Tanner Clary, Tim Nieradzik, TJ Banghart, xinqiu.hu, Zou Dan.
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 18; Guava versions 16.0.1 to 31.1-jre; other software versions as specified in gradle.properties.
Breaking Changes
[CALCITE-3870]
Change the default value of
SqlToRelConverter.Config.expand
from true to false. From now on SqlToRelConverter, handles sub-queries (such
as IN, EXISTS, and scalar sub-queries) by converting them to RexSubQuery
expressions, rather than expanding them. To expand these RexSubQuery
expressions, the SubQueryRemoveRule rule must be enabled in the planning
phase.
To keep the old behavior (which is discouraged but still supported),
initialize SqlToRelConverter using SqlToRelConverter.config().withExpand(true) as the value for
the config argument.
New features
- [CALCITE-5268]
Add
QUALIFYclause - [CALCITE-5469]
Add
DATETIME_ADD,DATETIME_DIFF,DATE_ADD,DATE_DIFFfunctions (enabled in BigQuery library) - [CALCITE-5484]
Add
DATETIME_SUBfunction (enabled in BigQuery library) - [CALCITE-5357]
Add
FORMAT_TIME,FORMAT_DATE,FORMAT_DATETIME,FORMAT_TIMESTAMPfunctions (enabled in BigQuery library) - [CALCITE-5508]
Add constructor functions for
DATE,TIME,TIMESTAMP,DATETIME(enabled in BigQuery library)
Dependency version upgrade
- Bump Quidem from 0.10 to 0.11
Bug-fixes, API changes and minor enhancements
- [CALCITE-5545]
Allow for overriding
SqlValidatorto enable customSqlNodevalidation - [CALCITE-5504]
Array value constructor is unparsed incorrectly for
SparkSqlDialect - [CALCITE-5518]
RelToSqlConvertergenerates invalid order ofROLLUPfields - [CALCITE-5510]
RelToSqlConvertershould use ordinal forORDER BYif the dialect allows - [CALCITE-5478]
Use highest input precision for datetimes in
SqlTypeFactoryImpl.leastRestrictive - [CALCITE-5522]
Babel parser cannot handle some overloads of the
DATE_TRUNCfunction - [CALCITE-5531]
COALESCEfunction throwsClassCastException - [CALCITE-5507]
HAVINGalias fails for mixed usage of alias and aggregate function - [CALCITE-5503]
CheapestPlanReplacershould reuse repeated nodes in a DAG plan - [CALCITE-5468]
SqlToRelConverterthrows ifORDER BYcontainsIN - [CALCITE-5515]
Add keyspace parameter to
CassandraSchemaandCassandraTable - [CALCITE-5416]
JDBC adapter for MySQL 5 incorrectly combines
GROUP BY ROLLUPandORDER BYclauses - [CALCITE-5505] JavaCC warns about missing LOOKAHEAD directives in Parser.jj
- [CALCITE-5514]
In
RelJson, add a publictoRex()instance method - [CALCITE-5442]
Tweak janino code generation in
EnumerableInterpretableto allow debugging - [CALCITE-5521]
Remove redundant rowtype check in
RelSubset#add - [CALCITE-5483]
ProjectAggregateMergeRulethrows exception if literal is non-numeric -
TryThreadLocalvalues are now not-null by default
Build and test suite
- [CALCITE-5546] Code style: Break long assignment expressions after ‘=’
- [CALCITE-5501]
SqlToRelConverterTest.checkActualAndReferenceFilesfails intermittently in Jenkins CI - Add test for [CALCITE-5524] JDBC adapter generates
LIMIT,OFFSETin wrong order for Presto dialect - Add tests for [CALCITE-2980] Implement the
FORMATclause of theCASToperator - [CALCITE-5537]
Slow test case failures in
LatticeSuggesterTest - Autostyle: Disallow space or newline before ‘)’ in method declaration or call
Web site and documentation
- [CALCITE-5555] Remove obsolete instructions for processing requests for new JIRA accounts
- [CALCITE-5550] Update instructions for requesting Jira account to use self-serve facility
-
CompositeOperandTypeChecker’s javadoc uses wrong class name
1.33.0 / 2023-02-06
This release comes five months after 1.32.0, contains contributions from 33 contributors, and resolves 107 issues.
Among others, it is worth highlighting the following improvements:
- Many improvements to the BigQuery dialect as part of [CALCITE-5180]
- [CALCITE-5269]
Implement BigQuery
TIME_TRUNCandTIMESTAMP_TRUNCfunctions - [CALCITE-5360]
Implement
TIMESTAMP_ADDfunction (compatible with BigQuery) - [CALCITE-5389]
Add
STARTS_WITHandENDS_WITHfunctions (forBIG_QUERYcompatibility) - [CALCITE-5404]
Implement BigQuery’s
POW()andTRUNC()math functions - [CALCITE-5423]
Implement
TIMESTAMP_DIFFfunction (compatible with BigQuery) - [CALCITE-5430]
Implement
IFNULL()for BigQuery dialect - [CALCITE-5432]
Implement BigQuery
TIME_ADD/TIME_DIFF - [CALCITE-5436]
Implement
DATE_SUB,TIME_SUB,TIMESTAMP_SUB(compatible w/ BigQuery) - [CALCITE-5447]
Add
DATE_TRUNCfor BigQuery
- [CALCITE-5269]
Implement BigQuery
- [CALCITE-5105]
Add
MEASUREtype andAGGREGATEaggregate function - [CALCITE-5155] Custom time frames
- [CALCITE-5280] Implement geometry aggregate functions
- [CALCITE-5314] Prune empty parts of a query by exploiting stats/metadata
Contributors to this release: Aitozi, Aleksey Plekhanov, Alessandro Solimando, Benchao Li, Bertil Chapuis, Christophe Le Saec, Dmitry Sysolyatin, Francis Chuang, Gian Merlino, Greg Hart, Hanumath Maduri, Istvan Toth, Jake Xie, James Turton, Jasmin Trada, Jess Balint (release manager), Julian Hyde, Kevin Risden, Krisztian Kasa, Liya Fan, Mou Wu, Oliver Lee, Scott Reynolds, Sergey Nuyanzin, Stamatis Zampetakis, TJ Banghart, Tanner Clary, Thomas Rebele, Tim Nieradzik, Volodymyr Vysotskyi, Xurenhe, Zhengqiang Duan, Zou Dan.
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 18; Guava versions 16.0.1 to 31.1-jre; other software versions as specified in gradle.properties.
Breaking Changes
- [CALCITE-5293]
Support general set operators in
PruneEmptyRules. The default configuration ofPruneEmptyRulesfor Set operators has changed: the rules matching scope has increased.
New features
- [CALCITE-2884]
Implement
JSON_INSERT,JSON_REPLACE,JSON_SET - [CALCITE-4186]
Add
ST_CoveredByspatial function - [CALCITE-5105]
Add
MEASUREtype andAGGREGATEaggregate function - [CALCITE-5127] Support correlation variables in Project
- [CALCITE-5155] Custom time frames
- [CALCITE-5159]
ARRAYstring constructor, and implicit cast from string literal (enabled in Postgres conformance) - [CALCITE-5269]
Implement BigQuery
TIME_TRUNCandTIMESTAMP_TRUNCfunctions - [CALCITE-5280] Implement geometry aggregate functions
- [CALCITE-5281] Implement geometry set returning functions (SRF)
- [CALCITE-5283]
Add
ARG_MIN,ARG_MAX(akaMIN_BY,MAX_BY) aggregate functions - [CALCITE-5360]
Implement
TIMESTAMP_ADDfunction (compatible with BigQuery) - [CALCITE-5362] Implement geometry measurement functions
- [CALCITE-5389]
Add
STARTS_WITHandENDS_WITHfunctions (forBIG_QUERYcompatibility) - [CALCITE-5393]
VALUEas an synonym forVALUESkeyword (enabled in MySQL conformance) - [CALCITE-5404]
Implement BigQuery’s
POW()andTRUNC()math functions - [CALCITE-5423]
Implement
TIMESTAMP_DIFFfunction (compatible with BigQuery) - [CALCITE-5430]
Implement
IFNULL()for BigQuery dialect - [CALCITE-5432]
Implement BigQuery
TIME_ADD/TIME_DIFF - [CALCITE-5436]
Implement
DATE_SUB,TIME_SUB,TIMESTAMP_SUB(compatible w/ BigQuery) - [CALCITE-5447]
Add
DATE_TRUNCfor BigQuery - [CALCITE-5451]
Implement
LPAD()andRPAD()functions - [CALCITE-5495]
Allow
WEEKandQUARTERinINTERVALliterals
Dependency version upgrade
- [CALCITE-5341] Upgrade Calcite to Avatica 1.23.0
- [CALCITE-5351] Bump jackson to 2.13.4 and jackson databind to 2.13.4.2 to avoid CVEs
- [CALCITE-5356] Update junit4 to 4.13.2 and junit5 to 5.9.1
- [CALCITE-5374] Upgrade jackson version to 2.14.0
Bug-fixes, API changes and minor enhancements
- [CALCITE-4351]
RelMdUtil#numDistinctValsalways returns 0 for large inputs - [CALCITE-4632]
Exception in
RelToSqlConverter: “Cannot convert x to DECIMAL(n, m) due to overflow” - [CALCITE-4804]
Support
Snapshotoperator serialization and deserialization - [CALCITE-4972]
Subfields of array columns containing structs are not qualified in
getFieldOrigins - [CALCITE-4982]
Do not push ‘cast to not null’ through
JoininProjectJoinTransposeRule - [CALCITE-5141] Incomplete implicit type conversion for insert values
- [CALCITE-5209] Proper sub-query handling if it is used inside select list and group by
- [CALCITE-5217]
Implement
unparseSqlIntervalLiteralin the Firebolt dialect - [CALCITE-5230]
Return type of
PERCENTILE_DISCshould be the same as sort expression - [CALCITE-5252]
JDBC adapter sometimes miss parentheses around
SELECTinWITH_ITEMbody - [CALCITE-5253]
NATURALjoin andUSINGshould fail if join columns are not unique - expression validation partially broken - [CALCITE-5259]
Add
getParameterRowTypemethod toPlannerinterface - [CALCITE-5264]
HintStrategyrule exclusion does not match innermost rels - [CALCITE-5265]
JDBC adapter sometimes adds unnecessary parentheses around
SELECTinINSERT - [CALCITE-5267]
Remove unused variable ‘newCasts’ in
AggregateCaseToFilterRule - [CALCITE-5276] Implicitly convert strings to geometries
- [CALCITE-5286]
Join with parameterized
LIMITthrowsAssertionError“not a literal” - [CALCITE-5288]
Expression
(a > 5 and a < 15) or (a > 10 and a < 20)should be simplified toSEARCH(a, Sarg[(5..20)]) - [CALCITE-5291] Make BigQuery lexical policy case insensitive
- [CALCITE-5293]
Support general set operators in
PruneEmptyRules - [CALCITE-5294] Prune the null-generating side of an outer join if it is empty
- [CALCITE-5296]
In a query with
ROLLUP, validator wrongly infers that a column isNOT NULL - [CALCITE-5297] Casting dynamic variable twice throws exception
- [CALCITE-5298]
CalciteSystemProperty
calcite.test.datasetpath check fails under Java Security Manager - [CALCITE-5299]
JDBC adapter sometimes adds unnecessary parentheses around
SELECTinWITHbody - [CALCITE-5305] Character literals with C-style escapes
- [CALCITE-5310]
JSON_OBJECTin scalar sub-query throwsAssertionError - [CALCITE-5314] Prune empty parts of a query by exploiting stats/metadata
- [CALCITE-5326]
SqlMergegenerate extra bracket ontoSqlString - [CALCITE-5332]
Configuring
PruneEmptyRulesis cumbersome - [CALCITE-5336]
Support inferring constants from predicates with
IS NOT DISTINCT FROMoperator - [CALCITE-5337]
UnionPullUpConstantsRuleproduces an invalid plan when pulling up constants for nullable fields - [CALCITE-5339]
Use
Method#getParameterCountrather thanMethod#getParametersto get length - [CALCITE-5342]
Refactor SqlFunctions
lastDay,addMonths,subtractMonthsto useDateTimeUtilsfrom Avatica - [CALCITE-5348]
When translating
ORDER BYinOVER, use the session’s default null collation (e.g.NULLS LAST) - [CALCITE-5349]
RelJsondeserialization should supportSqlLibraryOperators - [CALCITE-5355] Use the Presto SQL dialect for AWS Athena
- [CALCITE-5377]
RelFieldTrimmersupport Sort with dynamic param - [CALCITE-5383]
Update
CONCATfunction to allowBIG_QUERY - [CALCITE-5385] Add BigQuery as supported library for implemented functions
- [CALCITE-5388]
tempListexpression insideEnumerableWindow.getPartitionIteratorshould be unoptimized - [CALCITE-5391]
JoinOnUniqueToSemiJoinRuleshould preserve field names, if possible - [CALCITE-5392]
Support
SnapshotinRelMdExpressionLineage - [CALCITE-5394]
RelToSqlConverterfails when semi-join is under a join node - [CALCITE-5395]
RelToSqlConverterfails whenSELECT *is under a semi-join node - [CALCITE-5405]
MongoDB: Invalid
TIMESTAMPconversion - [CALCITE-5407]
MongoDB: Invalid
ARRAYconversion - [CALCITE-5408]
Return type of
PERCENTILE_CONTshould be the same as sort expression - [CALCITE-5410]
Assertion error on
PERCENT_REMAINDERoperator withDECIMALtype - [CALCITE-5414]
Use
DateTimeUtilsto correctly convert betweenjava.sqltypes and Unix timestamps - [CALCITE-5424] Customize handling of literals based on type system
- [CALCITE-5439]
Validation of Pivot fails after creating a deep copy of
SqlNode - [CALCITE-5450]
Add support for
WEEK(WEEKDAY)for custom time frames to relevant functions - [CALCITE-5452]
Add BigQuery
LENGTH()as synonym forCHAR_LENGTH() - [CALCITE-5454]
Update BigQuery Conformance for
!=and%operators - [CALCITE-5466] Constant condition can’t be reduced after correlate
- [CALCITE-5471]
RelSupplier.SqlRelSupplier#applyshould use.project(), not.rel - [CALCITE-5489]
When creating a
RexCalltoTIMESTAMP_DIFFfunction, cannot convert aTIMESTAMPliteral to aorg.apache.calcite.avatica.util.TimeUnit - [CALCITE-5491]
Allow
TIMEandDATEto be args forTIMESTAMPDIFF - [CALCITE-5493]
Time zone tests in
SqlFunctionsshould pass inEurope/London
Build and test suite
- [CALCITE-5197] Bump gradle to 7.4.2 and add checksum autoupdate
- [CALCITE-5306] Remove JDK15/16 EOL non-LTS JDKs in CI
- [CALCITE-5340] Tests should fail when actual and expected XML reference files are not identical
- [CALCITE-5417] Include Proj4J as an api dependency once the license allows it
- [CALCITE-5427] Provide code quality/coverage metrics with SonarCloud and JaCoCo
- [CALCITE-5428] Reduce minimum Guava version to 16.0.1
- [CALCITE-5433] Druid tests hang/fail intermittently in CI
- [CALCITE-5474] Disable Sonar quality gates to avoid checks appearing as failures
- [CALCITE-5475] Improve test coverage accuracy by aggregating modules
Web site and documentation
- [CALCITE-5239] Site: JDBC Adapter’s current limitations is incorrect
- [CALCITE-5287] SQL reference page is missing from website
1.32.0 / 2022-09-10
This release
fixes
CVE-2022-39135,
an XML External Entity (XEE) vulnerability that allows a SQL query to
read the contents of files via the SQL functions EXISTS_NODE,
EXTRACT_XML, XML_TRANSFORM or EXTRACT_VALUE.
Coming 1 month after 1.31.0 with 19 issues fixed by 17
contributors, this release also
replaces
the ESRI spatial engine with JTS and proj4j, adds
65
spatial SQL functions including ST_Centroid, ST_Covers and
ST_GeomFromGeoJSON, adds the
CHAR
SQL function, and improves the return type of the
ARRAY and
MULTISET functions.
Contributors to this release: Alessandro Solimando, Ali Mansour, Andrei Sereda, Benchao Li, Bertil Chapuis, Chunwei Lei, David Handermann, Dmitry Sysolyatin, Jiajun Bernoulli, Jing Zhang, Julian Hyde (release manager), Lincoln Lee, Mou Wu, Ruben Quesada Lopez, Stamatis Zampetakis, TJ Banghart, Zhengqiang Duan.
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 18; Guava versions 16.0.1 to 31.1-jre; other software versions as specified in gradle.properties.
Breaking Changes
None.
New features
- [CALCITE-5262] Add many spatial functions, including support for WKB (well-known binary) and GeoJSON
- [CALCITE-5241]
Implement
CHARfunction for MySQL and Spark, also JDBC{fn CHAR(n)} - [CALCITE-5251]
Support SQL hint for
Snapshot - [CALCITE-4802]
Support
IF(condition, then, else)statements in Babel parser - [CALCITE-4999]
ARRAY,MULTISETfunctions should return a collection of scalars if a sub-query returns 1 column - [CALCITE-5126]
Implicit column alias for single-column
UNNESTshould work with any single-columnUNNEST’s input
Dependency version upgrade
- [CALCITE-5278] Upgrade Janino from 3.1.6 to 3.1.8
- [CALCITE-5232] Upgrade protobuf-java from 3.17.1 to 3.21.5
Bug-fixes, API changes and minor enhancements
- [CALCITE-5270]
JDBC adapter should not generate
FILTER (WHERE ...)in Firebolt dialect - [CALCITE-5277]
Increase
BINDABLE_CACHEhit rate by making the order ofEnumerableRelImplementor.stashedParametersdeterministic - [CALCITE-5263]
SQL functions
EXISTS_NODE,EXTRACT_XML,XML_TRANSFORMandEXTRACT_VALUEallow user files to be read via XML External Entity (XEE) vulnerability CVE-2022-39135 (fixed by using a secure implementation of XMLDocumentBuilder) - [CALCITE-4294]
Use JTS and proj4j rather than ESRI as the underlying library for geospatial
(
ST_) functions - [CALCITE-5247]
FilterJoinRulecannot simplify left join to inner join forWHERE RHS.C1 IS NOT NULL OR RHS.C2 IS NOT NULL - [CALCITE-5243]
SELECT NULL AS CcausesNoSuchMethodException: java.sql.ResultSet.getVoid(int) - [CALCITE-5201]
Improve
SemiJoinRuleto matchJoin’s right input which is unique for join keys - [CALCITE-4223]
Metadata handlers for
TableScanshould see whether theRelOptTableimplements the handler - [CALCITE-5178]
Single column with
ROWtype generates wrong plan
Build and test suite
- [CALCITE-5274]
In
DiffRepository, use a more secureDocumentBuilderFactoryinstance - Add tests for correlated CTEs
- [CALCITE-5192]
CodeGenerationBenchmarkthrowsIllegalStateException
Web site and documentation
- [CALCITE-5275] Release notes for Calcite 1.32.0
- Cosmetic changes to release notes
- Remove redundant ‘the’ in javadoc
- Change sereda’s role from Committer to PMC
- Fix 1.31.0 release date to 2022-08-02 (was 2022-08-01)
- Fix checkstyle violation for Calcite 1.31 release note
1.31.0 / 2022-08-02
This release comes four months after 1.30.0, contains contributions from 28 contributors, and resolves 81 issues.
Among others, it is worth highlighting the following improvements:
- [CALCITE-4865] Allow table functions to be polymorphic
- [CALCITE-5107]
Support SQL hint for
Filter,SetOp,Sort,Window,Values - [CALCITE-35] Support parsing parenthesized joins
- [CALCITE-3890]
Derive
IS NOT NULLfilter for the inputs of inner join - [CALCITE-5085] Firebolt dialect implementation
Contributors to this release: Ada Wang, Andrei Sereda (release manager), Benchao Li, Chunwei Lei, Daniel Henneberger, Dmitry Sysolyatin, Francis Chuang, godfreyhe, hannerwang, henneberger, Jing Zhang, Julian Hyde, Konstantin Orlov, Liya Fan, Michael Mior, NobiGo, onTheQT, Roman Kondakov, Ruben Quesada Lopez, Sergey Nuyanzin, Stamatis Zampetakis, Viliam Durina, Vladimir Ozerov, Volodymyr Vysotskyi, Wenrui Meng, xiejiajun, xurenhe, zhangyue.
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 18; Guava versions 19.0 to 31.1-jre; other software versions as specified in gradle.properties.
Breaking Changes
- [CALCITE-4936]
Generalize
FilterCalcMergeRule/ProjectCalcMergeRuleto accept anyFilter/Project/Calcoperator.- Old behavior: The Project operator is transformed into Calc.
- New behavior: The Project operator is not transformed and the rule becomes NOOP.
New features
- [CALCITE-4865] Allow table functions to be polymorphic
- [CALCITE-5089]
Allow
GROUP BY ALLorDISTINCTset quantifier onGROUPING SETS - [CALCITE-5085] Firebolt dialect implementation
- [CALCITE-5086]
SQL parser should allow
OFFSETto occur beforeLIMIT - [CALCITE-5125]
Extend
||operator to work with arrays
Dependency version upgrade
- [CALCITE-5196] Bump apiguardian to 1.1.2
- [CALCITE-5221] Upgrade Avatica version to 1.22.0. Vulnerability fix CVE-2022-36364 (see CALCITE-5218)
- [CALCITE-5115] Upgrade jackson-databind from 2.9.10.1 to 2.13.2.1, and jackson from 2.10.0 to 2.13.2.1
- [CALCITE-5112] Upgrade Jetty from 9.4.15.v20190215 to 9.4.46.v20220331
- [CALCITE-5070] Upgrade Jekyll and ruby gems for site generation
- [CALCITE-5037] Upgrade HSQLDB to 2.5.2
Bug-fixes, API changes and minor enhancements
- [CALCITE-35] Support parsing parenthesized joins
- [CALCITE-5169]
xx < 1 OR xx > 1cannot be simplified toxx <> 1 - [CALCITE-4448]
Use
TableMacrouser-defined table functions withQueryableTable - [CALCITE-5000]
Expand
AGGREGATE_REDUCE_FUNCTIONS, when arg of agg-call exists in the aggregate’s group - [CALCITE-5091]
RelMdRowCountcan return more accurate rowCount when fetch is deterministic and offset is dynamic - [CALCITE-5149]
Refine
RelMdColumnUniquenessfor Aggregate by considering intersect keys between target keys and group keys - [CALCITE-5036]
RelMdPredicatessupport to analyze constant key for the operator ofIS_NOT_DISTINCT_FROM - [CALCITE-5044]
JDBC adapter generates integer literal in
ORDER BY, which some dialects wrongly interpret as a reference to a field - [CALCITE-4936]
Generalize
FilterCalcMergeRule/ProjectCalcMergeRuleto accept anyFilter/Project/Calcoperator - [CALCITE-5083]
In
RelBuilder.project_, do not unwrap SARGs - [CALCITE-5061] Improve recursive application of the field trimming
- [CALCITE-3890]
Derive
IS NOT NULLfilter for the inputs of inner join - [CALCITE-5118]
SqlDatePartFunction#rewriteCallshould check operands length - [CALCITE-5162]
RelMdUniqueKeyscan return more precise unique keys for Aggregate - [CALCITE-5073]
JoinConditionPushRulecannot inferLHS.C1 = LHS.C2fromLHS.C1 = RHS.C1 AND LHS.C2 = RHS.C1 - [CALCITE-5107]
Support SQL hint for
Filter,SetOp,Sort,Window,Values - [CALCITE-5194]
Cannot parse parenthesized
UNIONinFROM - [CALCITE-5206]
Parser allows
MERGEwith mismatched parentheses - [CALCITE-4746]
PIVOTwith aggregate and no without alias fails in Babel parser - [CALCITE-5045] Alias within GroupingSets throws type mis-match exception
- [CALCITE-5145]
CASEstatement withinGROUPING SETSthrows type mis-match exception - [CALCITE-5195]
ArrayIndexOutOfBoundsExceptionwhen inferring more equal conditions from join condition for semi join - [CALCITE-5157]
Query that applies dot operator (field access) to parenthesized expression
throws
ClassCastException - [CALCITE-5191]
Allow
ORDER BYalias in BigQuery - [CALCITE-5134] Queries with subquery inside select list does not work if subquery uses table from left join
- [CALCITE-5177] Query loses hint after decorrelation
- [CALCITE-5143]
Allow custom time unit abbreviations in
FLOOR,CEIL,EXTRACT,DATE_PART,DATEADD,DATEDIFFand similar functions - [CALCITE-5179]
In
RelToSqlConverter,AssertionErrorfor values with more than two items whenSqlDialect#supportsAliasedValuesis false - [CALCITE-4907]
JDBC adapter cannot push down join ON
TRUE(cartesian product) - [CALCITE-5147]
Allow
DATE,TIME,TIMESTAMP,INTERVALliterals in BigQuery dialect - [CALCITE-5013]
Unparse
SqlSetOperatorshould be retained parentheses when generating SQL forUNION ... LIMIT - [CALCITE-4897] Implicit type conversion is not complete for set operation in DML
- [CALCITE-5027]
Incorrect format for timestamp literals in
SqlDialect.quoteTimestampLiteral - [CALCITE-5153]
Create an immutable version of
ListSqlOperatorTable - [CALCITE-5139]
Improve Join print plan to add the
CorrelationIdinfo - [CALCITE-5003]
MergeUnionon types with different collators produces wrong result - [CALCITE-5117]
Optimize the
EXISTSsub-query usingRelMdRowCountmetadata - [CALCITE-4861]
Optimization of chained
CASTcalls can lead to unexpected behavior - [CALCITE-5048]
Query with parameterized
LIMITand correlated sub-query throwsAssertionError, “not a literal” - [CALCITE-5032]
RelOptUtil#splitJoinConditionreturns wrong when there is no equal condition - [CALCITE-4992] Resource leak in Elasticsearch adapter
- [CALCITE-4401]
SqlJoin.toStringthrowsRuntimeException, “No list started” - [CALCITE-5088]
JsonBuildershould escape backslashes in JSON strings - [CALCITE-5021]
Double
JOINis created forNOT INwhenIN-list that the values all non-nullable is converted toValues - [CALCITE-5064] Dialect factory returns ANSI SQL dialect for BigQuery
- [CALCITE-4989] Nested JSON_OBJECT creation does not produce proper JSON
- [CALCITE-5050]
Metadata (
RelMdRowCount) should reflect the fact that anAggregatewith noGROUP BYalways returns 1 row - [CALCITE-4913]
Deduplicate correlated variables in
SELECTclause - [CALCITE-5150] Parser should parse subquery with order by inside array constructor
- [CALCITE-5171]
NATURALjoin andUSINGshould fail if join columns are not unique - [CALCITE-5170] Assertion error on range distribution creation
- [CALCITE-5163]
MysqlSqlDialectsupport to unparseLISTAGGaggregate function - [CALCITE-5166]
Method
accept(RelShuttle)is not overridden inLogicalCalcandLogicalTableModify - [CALCITE-5137]
EnumerableUncollectthrowsNullPointerExceptionif input has ((List) null) - [CALCITE-5081] Group keys of Aggregate are wrongly changed during decorrelation
- [CALCITE-5138] Join on condition generates wrong plan when the condition is sub-query
- [CALCITE-5131] Remove redundant type cast
Build and test suite
- [CALCITE-5095] Support Java 18 and Guava 31.1-jre
- [CALCITE-5140] Spark, Piglet tests fail in GitHub CI with OpenJ9
- [CALCITE-4147] Rename master branch to main
- [CALCITE-5038]
Making
AGGREGATE_ANY_PULL_UP_CONSTANTS’s test case more rigorous
Web site and documentation
- [CALCITE-5092] Update site/README.md about how to release the site
- Site: Add Jing Zhang as committer
- Site: Add Benchao Li as committer
- Site: Add Chunwei Lei and Vladimir Ozerov as PMC members
- Site: Outline process for becoming Calcite committer by request
- Site: Remove missing avatar for Ted Dunning
- Site: Fix release announcement for 1.30.0
- [CALCITE-5075] Build fails due to rat check on Gemfile.lock
- [CALCITE-5079] Update code demo of tutorial
- [CALCITE-5102] Update github-pages gem for site build
- [CALCITE-5106] Upgrade to Jekyll 4 and remove unnecessary dependencies from gemfile for site
- [CALCITE-5108] Make website GDPR-compliant
- [CALCITE-5110] Geode adapter’s java doc url is invalid
- [CALCITE-5165] Improve javadoc
- [CALCITE-3129] Automate website builds
- [CALCITE-5111] jekyll-cache directory should be ignored by git
- [CALCITE-5015]
Fix typo in
PartiallyOrderedSet
1.30.0 / 2022-03-20
This release comes over two months after 1.29.0, contains contributions from 29 authors, and resolves 36 issues.
Among others, it is worth highlighting the following.
- Babel parser support MySQL NULL-safe equal operator ‘<=>’
- Support SQL hints for temporal table join
- Fluent test fixtures so that dependent projects can write parser, validator and rules tests
- Vulnerability issue CVE-2021-27568 fixed
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 17; Guava versions 19.0 to 31.0.1-jre; other software versions as specified in gradle.properties.
Contributors to this release: Alessandro Solimando, Bill Neil, Chen Kai, Eugen Stan, Feng Zhu, Jacques Nadeau, Jake Xie, Jay Narale, Jiatao Tao, Jing Zhang, Julian Hyde, Liya Fan (release manager), LM Kang, mans2singh, Marco Jorge, Marieke Gueye, NobiGo, Roman Puchkovskiy, Ruben Quesada Lopez, Scott Reynolds, Soumyakanti Das, Stamatis Zampetakis, Vova Vysotskyi, Will Noble, Xiong Duan, Xurenhe, Yanjing Wang, Yiqun Zhang, Zhe Hu.
New features
- [CALCITE-4980] Babel parser support MySQL NULL-safe equal operator ‘<=>’
- [CALCITE-4967] Support SQL hints for temporal table join
- [CALCITE-4885] Fluent test fixtures so that dependent projects can write parser, validator and rules tests
Bug-fixes, API changes and minor enhancements
- [CALCITE-5040]
SqlTypeFactoryTest.testUnknownCreateWithNullabilityTypeConsistencyfails - [CALCITE-5019]
Avoid multiple scans when table is
ProjectableFilterableTableand projections and filters act on different columns - [CALCITE-5011]
CassandraAdapterDataTypesTestfails with initialization error - [CALCITE-5008]
Ignore synthetic and static methods in
MetadataDef - [CALCITE-4997]
Keep
APPROX_COUNT_DISTINCTin someSqlDialects - [CALCITE-4996]
In
RelJson, add areadExpressionmethod that converts JSON to aRexNodeexpression - [CALCITE-4995]
AssertionErrorcaused byRelFieldTrimmeronSEMI/ANTIjoin - [CALCITE-4994] SQL-to-RelNode conversion is slow if table contains hundreds of fields
- [CALCITE-4991]
Improve
RuleEventLoggerto also print input rels inFULL_PLANmode - [CALCITE-4988]
((A IS NOT NULL OR B) AND A IS NOT NULL)can’t be simplify to(A IS NOT NULL)WhenAis deterministic - [CALCITE-4986]
Make
HepProgramthread-safe - [CALCITE-4968]
Use
TOP Nfor MsSQL instead ofFETCHwithoutOFFSET - [CALCITE-4965]
IS NOT NULLfailed in Elasticsearch Adapter - [CALCITE-4963]
Make it easier to implement interface
SqlDialectFactory - [CALCITE-4953]
Deprecate
TableAccessMapclass - [CALCITE-4952]
Introduce a simplistic
RelMetadataQueryoption - [CALCITE-4912]
Confusing javadoc of
RexSimplify.simplify - [CALCITE-4901]
JDBC adapter incorrectly adds
ORDER BYcolumns to theSELECTlist of generated SQL query - [CALCITE-4877]
Support Snapshot in
RelMdColumnOrigins - [CALCITE-4872]
Add
UNKNOWNvalue to enumSqlTypeName, distinct from theNULLtype - [CALCITE-4702]
Error when executing query with
GROUP BYconstant via JDBC adapter - [CALCITE-4683] IN-list converted to JOIN throws type mismatch exception
- [CALCITE-4323]
If a view definition has an
ORDER BYclause, retain the sort if the view is used in a query at top level - [CALCITE-4054]
RepeatUnioncontaining aCorrelatewith atransientScanon its RHS causesNullPointerException - [CALCITE-3673]
ListTransientTableshould not leave tables in the schema - [CALCITE-3627]
Incorrect null semantic for
ROWfunction - [CALCITE-1794]
Expressions with numeric comparisons are not simplified when
CASTis present
Build and test suite
- [CALCITE-5006] Gradle tasks for launching JDBC integration tests are not working
- [CALCITE-4960] Enable unit tests in Elasticsearch Adapter
Dependency version upgrade
- [CALCITE-5030] Upgrade jsonpath version from 2.4.0 to 2.7.0
- [CALCITE-5025] Upgrade commons-io version from 2.4 to 2.11.0
- [CALCITE-5007] Upgrade H2 database version to 2.1.210
- [CALCITE-4973] Upgrade log4j2 version to 2.17.1
Web site and documentation
- Site: Update PMC Chair
- Site: Add external resources section in the community page
- Site: Add “calcite-clj - Use Calcite with Clojure” in talks section
- Site: Add Alessandro Solimando as committer
- Site: Change the javadoc title to Apache Calcite API
- Site: For tables that display results, center the content horizontally
- Site: Add syntax highlighting to SQL statements
- Site: Improve HTML tables display & update CSV tutorial
1.29.0 / 2021-12-26
This release comes two months after 1.28.0, contains contributions from 23 authors, and resolves 47 issues.
This release upgrades log4j2 to 2.17.0 to fix security vulnerabilities such as CVE-2021-44228 and CVE-2021-45105.
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 17; Guava versions 19.0 to 31.0.1-jre; other software versions as specified in gradle.properties.
Contributors to this release: Ada Wong, Aleksey Plekhanov, Alessandro Solimando, Chunwei Lei, Francesco Gini, Jacques Nadeau, Jay Narale, Julian Hyde, liuyanze, Louis Kuang, NobiGo, Ruben Quesada Lopez, Rui Wang (release manager), Sergey Nuyanzin, Stamatis Zampetakis, Thomas Rebele, Vladimir Sitnikov, Will Noble, Zhe Hu.
New features
- [CALCITE-4822]
Add
ARRAY_CONCAT,ARRAY_REVERSE,ARRAY_LENGTHfunctions for BigQuery dialect - [CALCITE-4877] When a plugin class is not found, make the exception more explicit
- [CALCITE-4841]
Support
decimalcolumn type in CSV and File adapters - [CALCITE-4925]
AggregateReduceFunctionsRuleshould accept arbitrary predicates
Bug-fixes, API changes and minor enhancements
- [CALCITE-4839]
Remove remnants of
ImmutableBeanspost 1.28 release - [CALCITE-4795]
In class
SqlBasicCall, make theoperandsfield private - [CALCITE-4818]
AggregateExpandDistinctAggregatesRulemust infer correct data type for top aggregate calls - [CALCITE-4551] Reusing immutable metadata cache keys
- [CALCITE-4131]
The
XmlFunctionsexception handled bySystem.out - [CALCITE-4875]
NVLfunction incorrectly changes nullability of its operands - [CALCITE-4844]
IN-list that references columns is wrongly converted toValues, and gives incorrect results - [CALCITE-4846]
IN-list that includesNULLconverted toValuesthrows exception - [CALCITE-4884]
Provide a new constructor for
RelJsonWriterto allow customizedJsonBuilder - [CALCITE-4876]
JDBC adapter generates wrong SQL in Calcite dialect when
EnumerableIntersectis followed byEnumerableLimit - [CALCITE-4883]
When
Exchangeis created from externalized JSON,RelDistributionis not correctly set in itstraitSet - [CALCITE-4783]
RelFieldTrimmerincorrectly drops filter condition - Log plan after physical tweaks in new line
- [CALCITE-4927]
Remove deprecated method
RelBuilder.groupKey(ImmutableBitSet, ImmutableList)that clashes with newer API method - [CALCITE-4928]
Decouple Janino from
RelMetadataQuery - [CALCITE-4932]
Deprecate
JdbcCalcand removeJdbcCalcRule - [CALCITE-4894]
Materialized view rewriting fails for conjunctive top expressions in
SELECTclause - [CALCITE-4929]
Add default methods for
getDefon metadata handlers - Improve debug message in
IterativeRuleDriver - Remove duplicate entries from
RelOptRules.CALC_RULES - [CALCITE-4906] Wrong result for scalar sub-query (single value aggregation) from empty input
- [CALCITE-4941]
SemiJoinRuleloses hints - [CALCITE-4895]
MAPtype in user-defined function (UDF) cannot be created from externalized JSON - [CALCITE-4946]
Add method
RelBuilder.size() - [CALCITE-4704] Log produced plan after rule application using explain formatting
- [CALCITE-4700]
AggregateUnionTransposeRuleproduces wronggroupingSetsfor the topAggregate
Build and test suite
- Exclude kotlin-stdlib from
:coreruntime dependencies - Clarify why squash commits option in GitHub PR merge is disabled
- Keep backslash when autoformatting
...\n" + - Use GitHub Action concurrency feature to cancel stale CI executions
- Set timeout for running Druid tests in GitHub CI
- [CALCITE-4917]
Add test for
a IS NOT NULL AND a = bsimplification - [CALCITE-4851]
Build gives lots of ‘
Execution optimizations have been disabled’ warnings
Dependency version upgrade
- [CALCITE-4847] Support Java 16 and 17
- [CALCITE-4858] Use Log4j2 instead of unsupported Log4j (1.x) in tests
- [CALCITE-4768] Upgrade DataStax Driver for Apache Cassandra® version to latest 4.x
- Bump
com.github.vlsi.vlsi-release-pluginsto 1.76 - Update Gradle to 7.3
- [CALCITE-4937] Upgrade Calcite to Avatica 1.20
- [CALCITE-4938] Upgrade SQLLine to 1.12.0
- [CALCITE-4948] Upgrade Elasticsearch to 7.10.2
- [CALCITE-4950] Upgrade log4j2 version 2.17.0
Web site and documentation
- Site: Add Xiong Duan as committer
- Site: Fix typo in reference.md
1.28.0 / 2021-10-19
This release comes four months after 1.27.0, contains contributions from 38 authors, and resolves 76 issues. New features include the UNIQUE sub-query predicate, the MODE aggregate function, PERCENTILE_CONT and PERCENTILE_DISC inverse distribution functions, an Exasol dialect for the JDBC adapter, and improvements to materialized view recognition.
This release contains some breaking changes due to the
replacement of ImmutableBeans with Immutables;
the changes concern custom planner rule configurations, in particular
interface RelRule.Config, and are fully described in the
news item.
Two APIs are deprecated and will be removed in release 1.29.
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 15; Guava versions 19.0 to 31.0.1-jre; other software versions as specified in gradle.properties.
Contributors to this release: Alessandro Solimando, Alon Eldar, Amir Gajst, Bruce Irschick, dz, Evgeniy Stanilovskiy, Feng Zhu, Grzegorz Gierlach, Haisheng Yuan, Jack Scott, Jacky Yin, Jacques Nadeau, James Starr, Jesus Camacho Rodriguez, Jianhui Dong, Jiasen Sheng, Julian Hyde (release manager), Liu Enze, Michael Mior, Narayanan Venkateswaran, Nick Riasanovsky, NobiGo, Rafay Qureshi, Ruben Quesada Lopez, Sergey Nuyanzin, Stamatis Zampetakis, Taras Ledkov, Thomas Rebele, TJ Banghart, Ulrich Kramer, Vladimir Ozerov, Vladimir Sitnikov, Will Noble, Xurenhe, Yanjing Wang, Yingyu Wang, YuKong.
Deprecated for removal next release
- In 1.28,
[CALCITE-4787]
added
class Immutablesand deprecatedImmutableBeans; in 1.29, [CALCITE-4839] will removeImmutableBeans - In 1.28,
[CALCITE-4795]
deprecated the
operandsfield ofSqlBasicCall. Before 1.29, we will make that field private.
New features
- [CALCITE-4719]
Add variants of
RexSubQuerythat collect sub-queries intoMULTISET,ARRAYandMAPcollections - [CALCITE-3524]
In
RelBuilder, add methods for creating various kinds of sub-query - [CALCITE-2736]
ReduceExpressionsRulenever reduces dynamic expressions but this should be configurable - [CALCITE-4847] Parse SQL with BigQuery-style quoted identifiers and character literals
- [CALCITE-4805]
Calcite should convert a small
IN-list as if the user had writtenOR, even if theIN-list containsNULL - [CALCITE-4779]
If
GROUP BYclause contains literal, materialized view recognition fails - [CALCITE-4486]
UNIQUEsub-query - [CALCITE-3935] Enhance join materialization, support to pull-up filters under join of left or right
- [CALCITE-4767] JDBC adapter wrongly quotes backticks inside BigQuery identifiers
- [CALCITE-4774] Materialized view recognition fails for equivalent predicates
- [CALCITE-4742]
Implement
SOME <>sub-query - [CALCITE-4726]
Support aggregate calls with a
FILTERclause inAggregateExpandWithinDistinctRule - [CALCITE-4748]
If there are duplicate
GROUPING SETS, Calcite should return duplicate rows - [CALCITE-4665]
Allow
Aggregate.groupKeyto be a strict superset ofAggregate.groupKeys - [CALCITE-4724]
In JDBC adapter for ClickHouse, implement
Valuesby generatingSELECTwithoutFROM - [CALCITE-4673]
If arguments to a table function are correlation variables,
SqlToRelConvertershould eliminate duplicate variables - [CALCITE-4642]
Use
RelDataTypeSystemfromConfiginPlanner - [CALCITE-4661]
Add
MODEaggregate function - [CALCITE-4420] Some simple arithmetic operations can be simplified
- [CALCITE-4640] Propagate table scan hints to JDBC
- [CALCITE-4668]
RelBuilder.joinshould convertCorrelatetoJoinif correlation variable is unused - [CALCITE-4644]
Add
PERCENTILE_CONTandPERCENTILE_DISCfunctions - [CALCITE-4614] Exasol dialect implementation
- [CALCITE-4158]
In generated SQL, “
*” should be followed by space - [CALCITE-4606]
In Elasticsearch adapter, translate
SEARCHcall totermsQuery - [CALCITE-4499]
FilterJoinRulemisses opportunity to pushFiltertoSemiJoininput
Bug-fixes, API changes and minor enhancements
- [CALCITE-4848]
Adding a
HAVINGcondition to a query with a dynamic parameter makes the result always empty - [CALCITE-4550]
Simplify
JaninoRelMetadataProviderAPI for binding methods - [CALCITE-4740]
JDBC adapter generates incorrect
HAVINGclause in BigQuery dialect - Refactor: Introduce field
SqlUtil.GENERATED_EXPR_ALIAS_PREFIX - [CALCITE-4616]
AggregateUnionTransposeRulecauses row type mismatch when some inputs have unique grouping key - [CALCITE-4795]
In class
SqlBasicCall, deprecated theoperandsfield - [CALCITE-4628]
If
SqlImplementorfails, include theRelNodein the exception - [CALCITE-4757]
In Avatica, support columns of type
NULLin query results - [CALCITE-4602]
ClassCastExceptionretrieving fromARRAYthat has mixedINTEGERandDECIMALelements - [CALCITE-4600]
ClassCastExceptionretrieving from anARRAYthat hasDATE,TIMEorTIMESTAMPelements - [CALCITE-3338]
Error with
executeBatchandpreparedStatementwhen usingRemoteMeta - [CALCITE-4811]
Coalesce(null, row)fails withNullPointerException - [CALCITE-3583]
Exchangeoperator deserialize fails when theRexInputhas noRelCollation - [CALCITE-3745]
CompileExceptioninUnitCompilerwhen using multiple class loaders - [CALCITE-4834]
JaninoRelMetadataProvideruses hardcoded class name - [CALCITE-4819]
SemiJoinoperator is not skipped in materialized view-based rewriting algorithm - [CALCITE-4546]
Change metadata dispatch to avoid registration of all
RelNodesubtypes - [CALCITE-4787]
Replace
ImmutableBeanswithImmutablesincoremodule- [CALCITE-4830]
Remove remaining uses of
ImmutableBeansand deprecate - [CALCITE-4825]
Move remaining core/main off of
ImmutableBeans
- [CALCITE-4830]
Remove remaining uses of
- [CALCITE-4532]
Correct code generated for primitive-object
ConstantExpression - [CALCITE-3409]
Add a method in
RelOptMaterializationsto allow registeringUnifyRule - [CALCITE-4773]
RelDecorrelator’sRemoveSingleAggregateRulecan produce result with wrong row type - [CALCITE-4544]
Deprecate
MetadataAPI backed by Java Reflection - [CALCITE-4772]
PushProjectorshould retain alias when handlingRexCall - Remove obsolete/misleading comments in
RelOptUtil#classifyFilters - [CALCITE-4784]
Ensure
Correlate#requiredColumnsis subset of columns in left relation - [CALCITE-4177]
RelJsonshould throw if asked to deserialize a call to an unknown operator - Add
RelBuilder.lessThan, and useRelBuildershorthands - [CALCITE-4766]
Remove unreachable code from
SqlValidatorImpl#performUnconditionalRewritesforValuesnode - [CALCITE-4747]
In
HepPlanner, remove outdated graph edges - [CALCITE-4760]
RelBuildercreation fails with error ‘No suitable driver found for jdbc:calcite:’ in shaded Calcite - [CALCITE-4584]
Using function in
PARTITION BYlist ofOVERwindow causes conversion exception - [CALCITE-4734]
If there are duplicate
RexNodeinMutableCalc,SubstitutionVisitorshould return right rebuildRexNode - [CALCITE-4741]
AbstractRelNode#getIdcan overflow into a negative value, causingCompileExceptionin theimplementmethods of certainEnumerablesub-classes - [CALCITE-4652]
AggregateExpandDistinctAggregatesRulemust cast top aggregates to original type - [CALCITE-4716]
ClassCastExceptionconverting Sarg inRelNodeto SQL - [CALCITE-4706] JDBC adapter generates casts exceeding Redshift’s data types bounds
- [CALCITE-4485]
JDBC adapter generates invalid SQL when one of the joins is
INNER JOIN ... ON TRUE - [CALCITE-4623]
SemiJoinRuleshould not match semi-join - [CALCITE-4692]
Redshift does not support
DOUBLEorTINYINTdatatypes - [CALCITE-4690]
Error when executing query with
CHARACTER SETin Redshift - [CALCITE-4675] Error executing query with SUM and multiplication via JDBC adapter
- [CALCITE-4674]
Excess quotes in generated SQL when “
*” is a column alias - [CALCITE-3775]
Implicit lookup methods in
SimpleCalciteSchemaignore case sensitivity parameter - [CALCITE-4638]
VolcanoPlannerfails to recognize transformation rule correctly in the top-down mode - [CALCITE-4655]
JdbcTable.scanthrowsNullPointerException - [CALCITE-4636]
Switch out of agg mode when constructing
RelCollationfor aggregate functions - [CALCITE-4619]
FULL JOINplan cannot be executed in MySQL
Build and test suite
- Bump JDK from 15 to 17 in seed build cache CI jobs
- [CALCITE-4798] Gradle build fails due to deprecated metadata APIs
- Use jdk16 instead of jdk17 since jdk17 is not yet available at AppVeyor
- Fix string reference to
HrSchemainMaterializationTestwithHrSchema.class.getName() - [CALCITE-4829] Bump Gradle to 7.2 and test with Java 17 at GitHub Actions
- Fix
ErrorProneviolations intestkit - Add missing
@Overrideannotations - [CALCITE-4821]
Move utility test classes into
calcite-testkitand unpublish-test.jar - [CALCITE-4823]
Suppress warnings for
java.security.AccessControllerdeprecation - Skip
EqualsHashCodeverification inErrorProne: it is already verified withCheckstyle - [CALCITE-4790]
Make Gradle pass the
user.timezoneproperty to the test JVM - [CALCITE-4793]
CassandraAdapterDataTypesTest.testCollectionsInnerValuesfails depending on the user timezone - Replace deprecated
com.google.common.io.Files.createTempDir()withjava.nio.file.Files.createTempDirectory()in ElasticSearch tests - [CALCITE-4789] Build is broken on Guava versions < 21
- Enable
JdbcTest#testBushyand update expected plan -
RelOptRulesTestimprovements - [CALCITE-4312]
Improve content of
prepareVotedraft email
Dependency version upgrade
- Bump Guava maximum version up to 31.0.1-jre
- [CALCITE-4762] Upgrade Calcite to Avatica 1.19
- [CALCITE-4836] Upgrade protobuf-java 3.6.1 → 3.17.1
- Bump JUnit5 to 5.8.1
Web site and documentation
- [CALCITE-4835] Release Calcite 1.28.0
- Site: Pronouns, talks
- Site: Add Zhaohui Xu as committer
- Site: Update fengzhu’s organization and add pronouns
- Site: Remove vote email from release instructions, and minor improvements
- Site: Add upcoming talk about Morel and update past talks section
- Site: Remove contributors name from commit summary
- [CALCITE-4656] Broken CI links on develop web page
- [CALCITE-4796]
Travis links in
README.mdshould point toapp.travis-ci.cominstead oftravis-ci.org - Site: HTTP to HTTPS redirection is not working
- Site: Add zabetak’s pronouns
- Site: Add michaelmior’s pronouns
- Site: Update jhyde’s organization and add pronouns
- Site is not published due to bad yaml file suffix
- Site: Add upcoming talk at ApacheCon’21 and info about tutorial at BOSS21
- Site: Sort table of aggregate functions
- Site: Deploy using
.asf.yml - Site: Add Vladimir Ozerov as committer
- Site: Remove nowadays redundant minified javascript files
1.27.0 / 2021-06-03
This release comes eight months after 1.26.0. It includes more than 150 resolved issues, comprising a few new features, three minor breaking changes, many bug-fixes and small improvements, as well as code quality enhancements and better test coverage.
Among others, it is worth highlighting the following:
- InnoDB adapter
- Three-valued logic for SEARCH operator
- MergeUnion operator in Enumerable convention
- Explain plan with DOT format
- ErrorProne code quality checks
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 15; Guava versions 19.0 to 29.0-jre; other software versions as specified in gradle.properties.
Breaking Changes
- [CALCITE-4251] Get the origin column, even if it is derived
- [CALCITE-4570] Always validate preconditions in Filter/Correlate/Snapshot expressions when assertions are enabled
- [CALCITE-4427]
Make
SUBSTRINGoperator comply with ISO standard SQL
New features
- [CALCITE-4564] Initialization context for non-static user-defined functions (UDFs)
- [CALCITE-4477]
In
Interpreter, support table-valued functions - [CALCITE-4418] Allow Interpreter to read from JDBC input
- [CALCITE-3574]
Add
RLIKEoperator (similar toLIKE, but Hive- and Spark-specific) (Shradha Ambekar) - [CALCITE-4483]
WITHIN DISTINCTclause for aggregate functions (experimental) - [CALCITE-3221]
Add
MergeUnionoperator inEnumerableconvention - [CALCITE-4349]
GROUP_CONCATaggregate function (MySQL’s equivalent ofLISTAGG) - [CALCITE-4443]
Add
ILIKEoperator (asLIKE, but case-insensitive and Postgres-specific) (Ondřej Štumpf) - [CALCITE-4456]
Allows all value expressions in
ROW - [CALCITE-4433]
Add
UNPIVOToperator to SQL - [CALCITE-4408]
Implement Oracle
SUBSTRfunction (James Starr) - [CALCITE-4374]
Support materialized view recognition when query distinct aggregate on target
GROUP BYcolumns (xzh) - [CALCITE-4369]
Support
COUNTIFaggregate function for BigQuery (Aryeh Hillman) - [CALCITE-4354]
Allow
ITEMoperator onROW/STRUCTdata types (Alessandro Solimando) - [CALCITE-4335]
ARRAY_AGG,ARRAY_CONCAT_AGG,STRING_AGGaggregate functions for BigQuery - [CALCITE-2935]
Support
BOOL_AND,BOOL_OR,LOGICAL_AND,LOGICAL_ORaggregate functions (ShuMingLi) - [CALCITE-3731]
Add
IFfunction for BigQuery, Hive and Spark dialects (Vaibhav Jain) - [CALCITE-4260]
Support plan explain with
DOTformat (Liya Fan) - [CALCITE-4297] Allow BigQuery to parse and validate niladic functions (Mr. Swett)
- [CALCITE-4034]
InnoDBadapter (neoremind)
Bug fixes, API changes and minor enhancements
- [CALCITE-4497]
In
RelBuilder, support windowed aggregate functions (OVER) - [CALCITE-4620]
Join on
CASEcausesAssertionErrorinRelToSqlConverter - [CALCITE-4446] Implement three-valued logic for SEARCH operator
- [CALCITE-4621]
SemiJoinRulethrowsAssertionErroronANTIjoin - [CALCITE-4610]
Join on range causes
AssertionErrorinRelToSqlConverter - [CALCITE-4609]
AggregateRemoveRulethrows while handlingAVG - [CALCITE-4603] Least restrictive type considers only the last element in collections of collections
- [CALCITE-4548]
SqlToRelConverter#convertExpressioncannot convertSqlNodewith sub query (jibiyr) - [CALCITE-2317]
Support JDBC
DatabaseMetaData#getFunctions(Malte Bellmann) - [CALCITE-4594]
Interpreter returns wrong result when
VALUEShas zero fields - [CALCITE-4510]
RexLiteralcan produce wrong digest for some user defined types - [CALCITE-4560]
Wrong plan when decorrelating
EXISTSsubquery withCOALESCEin the predicate - [CALCITE-4574]
Wrong/Invalid plans when using
RelBuilder#joinwith correlations - [CALCITE-4591]
RelRunnershould throw SQLException if prepare fails - [CALCITE-4585]
Improve error message from
RelRunner(NobiGo) - [CALCITE-4586]
In piglet, allow creating a
PigRelBuilderwith customconfig.simplify()(Jiatao Tao) - [CALCITE-4583]
Control simplification in
RelBuilder#filterwithconfig.simplify()(Jiatao Tao) - [CALCITE-4571]
In piglet, a Pig Latin script with multiple
STOREcommands causes the merging of multiple SQL statements (Mahesh Kumar Behera) - [CALCITE-4569]
In piglet, allow creating a
PigConverterwith custom properties (Mahesh Kumar Behera) - [CALCITE-4572]
Piglet fails if Pig Latin script contains
RANKorFILTERoperators (Mahesh Kumar Behera) - [CALCITE-4579]
Piglet throws
ClassCastExceptionif Pig Latin script containsFLATTENorSTRSPLIToperators (Mahesh Kumar Behera) - [CALCITE-4515] Do not generate the new join tree from commute/associate rules if there are “always TRUE” conditions (Vladimir Ozerov)
- [CALCITE-4535]
ServerDdlExecutorcannot executeDROPcommands with qualified object names (Vladimir Ozerov) - [CALCITE-4511] Distinct row count and population size for constant columns should be 1
- [CALCITE-4562] Improve simplification of “x IS TRUE” and “x LIKE ‘%’”
- [CALCITE-4556]
CalciteMetaImpl#createEmptyResultSetshould not pass class toCursorFactory#deduce(Alessandro Solimando) - [CALCITE-4522]
CPU cost of
Sortshould be lower if sort keys are empty (huangqixiang) - [CALCITE-4552]
Interpreterdoes not close resources held by its nodes on close - Add method RelJsonReader.readType
- [CALCITE-4524]
Make some fields non-nullable (
SqlSelect.selectList,DataContext.getTypeFactory) - [CALCITE-4533]
Incorrect semantics of
REPLACEandIF NOT EXISTSkeywords inCREATE TABLE/SCHEMAcommands (Vladimir Ozerov) - [CALCITE-4342] More aggregate functions should be marked as splittable and ignore distinct optionality (Liya Fan)
- [CALCITE-4526]
SqlSnapshot#unparseloses theASkeyword when the table has alias (jibiyr) - [CALCITE-4276]
MaterializedViewOnlyAggregateRuleperforms invalid rewrite on query that contains join and time-rollup function (FLOOR) (Justin Swett) - [CALCITE-2000]
UNNESTa collection that has a field with nested data generates anException - [CALCITE-4514]
When merging
RelSets, fine-tune which set is merged into which, for efficiency (Botong Huang) - [CALCITE-4437]
Sortshould be decorrelated even though it has fetch or limit when it is not inside aCorrelate(Thomas Rebele) - [CALCITE-4265]
Improve error message when
CASTto unknown type (Louis Kuang) - [CALCITE-4494]
Improve performance of checking
RelNodepresence inRelSubset(Igor Lozynskyi) - In
RelBuilder, remove not-null arguments toCOUNT - [CALCITE-4199]
RelBuilderthrowsNullPointerExceptionwhile implementingGROUP_ID() - [CALCITE-4491] Aggregation of window function produces invalid SQL for Postgres (Dominik Labuda)
- [CALCITE-4426]
Short-circuit evaluating when comparing two
RelTraitSets(Jiatao Tao) - [CALCITE-4482]
Extract the default
SqlWriterConfiginSqlPrettyWriter, reduce the overhead ofImmutableBeans#create(Jiatao Tao) - [CALCITE-4461]
Do not use
Logicalnodes insideEnumerablerules (Vladimir Ozerov) - [CALCITE-4479]
vFloat in (1.0, 2.0)throwsUnsupportedOperationException - [CALCITE-4474]
SqlSimpleParserinner Tokenizer should not recognize the sql of TokenType.ID or some keywords in some case (wangjie) - [CALCITE-4431]
Use
requireNonNull(var, "var")instead ofrequireNonNull(var)for better error messages - [CALCITE-4466]
Do not invoke
RelTraitDef#convertwhen the source trait satisfies the target trait (Vladimir Ozerov) - [CALCITE-4463]
JDBC adapter for Spark generates incorrect
ORDER BYsyntax (Yanjing Wang) - [CALCITE-4453]
RexExecutorImpl#compileshould useRexBuilder’s type factory if possible - [CALCITE-4450]
ElasticSearch query with
VARCHARliteral projection fails withJsonParseException - [CALCITE-4449]
Generate nicer SQL for Sarg
x IS NULL OR x NOT IN (1, 2) - [CALCITE-4434]
Cannot implement
CASE row WHEN row - [CALCITE-4425]
Class
DefaultEdgelacks a propertoStringimplementation (Liya Fan) - Change return type of
RelBuilder#literalfromRexNodetoRexLiteral - [CALCITE-4435]
Incorrect logic for validating
RexFieldAccess - [CALCITE-4436]
Use the fields order from the struct type for
ITEM(STRUCT, INDEX)access (Alessandro Solimando) - [CALCITE-4429]
RelOptUtil#createCastRelshould throw if source and target row types have different number of fields - [CALCITE-4419]
POSIX regex operators cannot be used within
RelBuilder - [CALCITE-4411]
RelNodeto SQL losesDISTINCTon window aggregation (Jiatao Tao) - [CALCITE-4284]
ImmutableBeans: make reference properties non-nullable by default - [CALCITE-4199] Add nullability annotations
- [CALCITE-4199] Add package-level NonNull annotations to calcite packages
- [CALCITE-4214]
Make
RelDataType#getSqlTypeNamenon-nullable - [CALCITE-4251]
NullPointerExceptioninLoptMultiJoinwhenmq#getColumnOrigin(left, i)returnsnull - [CALCITE-4415]
SqlStdOperatorTable.NOT_LIKEhas a wrong implementor - [CALCITE-4317]
RelFieldTrimmerafter trimming all the fields in an aggregate should not return a zero field Aggregate (Rafay) - [CALCITE-4414]
RelMdSelectivity#getSelectivityforCalcpropagates predicate with wrong references - [CALCITE-4409]
Improve exception when
RelBuildertries to create a field on a non-struct expression - [CALCITE-4393]
ExceptionInInitializerErrordue toNullPointerExceptioninSqlCallBindingcaused by circular dependency - [CALCITE-4251]
Support
CalcandSetOpoperator inRelMdAllPredicates(Xu Zhaohui) - [CALCITE-4402]
SqlCall#equalsDeepdoes not take into account the function quantifier (Huang Qixiang) - [CALCITE-4251] Get the origin column, even if it is derived (xzh)
- [CALCITE-4406]
SqlTableRefoperator should create aSqlTableRefas the call - [CALCITE-4277]
When
RelNodehas been removed from its subset, skip the origin rule match (Jiatao Tao) - [CALCITE-4392] The operation of checking types equal ignoring null can be more efficient
- [CALCITE-4383]
In
RelBuilder, optimizeVALUES ... UNION ALL ... VALUESto a singleVALUESwith multiple rows - [CALCITE-4394] When generating code for a function call, take the inferred types of the operands into account
- [CALCITE-4389]
Calls to
ROWand implicit row constructor sometimes print too many spaces - [CALCITE-4380]
Make class
SqlNodeListimplementList<SqlNode> - [CALCITE-4390]
SqlMatchRecognizereturns wrong operand list (Dawid Wysakowicz) - [CALCITE-4364]
a IN (1, 2) AND a = 1should be simplified toa = 1 - [CALCITE-4273] Support get expression lineage for Calc
- [CALCITE-4350] The reverse operation of collation direction is overly relaxed (Liya Fan)
- [CALCITE-4345]
AggregateCaseToFilterRulethrowsNullPointerExceptionwhen convertingCASEwithoutELSE(Jiatao Tao) - [CALCITE-4233] In Elasticsearch adapter, support generating disjunction max (dis_max) queries (shlok7296)
- [CALCITE-4106]
Consider
listCoercedinTypeCoercionImpl#inOperationCoercion(Jiatao Tao) - [CALCITE-4352]
RexSimplifyincorrectly dropsIS NULLandIS NOT NULLfromSEARCHexpressions - BigQuery dialect should allow
GROUP BYordinal - [CALCITE-4332] Improve error when planning rule produces a relational expression with wrong row type
- [CALCITE-4225]
Make
RelDecorrelatorpluggable - [CALCITE-4305]
Implicit column alias for single-column
VALUES, andUNNESTofARRAYandMULTISETconstructors - Add an overloaded
SqlOperator#createCall - [CALCITE-4321]
JDBC adapter omits
FILTER (WHERE ...)expressions when generating SQL (Jeremiah Rhoads Hall) - [CALCITE-4325]
RexSimplifyincorrectly simplifies complex expressions that contain Sarg andIS NULL - [CALCITE-4240]
SqlTypeUtil#getMaxPrecisionScaleDecimalreturns a decimal with same precision and scale (Jiatao Tao) - [CALCITE-4333]
Sortrel should be decorrelated even though it has fetch or limit when its parent is not aCorrelate - [CALCITE-4302]
Avoid cost re-propagation in
VolcanoPlanner(Botong Huang) - [CALCITE-4324] Avoid sqlline classpath caching by default, add sqlline and sqlsh tests
- [CALCITE-4315]
NPEinRelMdUtil#checkInputForCollationAndLimit - [CALCITE-4316]
NPEwhen division includes nulls - Add method RelBuilder.isDistinctFrom()
- Add class SqlBasicAggFunction
- Add generic info to
Map&Arrayannotation - Refactor: Add method SqlOperator.reverse()
- Refactor: Make HintStrategyTable immutable
- Refactor: move CassandraRules.reverseDirection into Direction
- Remove the insecure, unused
TrustAllSslSocketFactoryclass (intrigus-lgtm) - Remove multiple blank lines after package statements
- Remove multiple blank lines after import statements
- Cleanup code after errorprone upgrade:
IdentityHashMapUsage,JdkObsolete→JavaUtilDate
Build and test suite
- [CALCITE-4613] OWASP dependency-check tasks fail due to missing resources
- [CALCITE-4576] Release process should not overwrite LICENSE file
- [CALCITE-4575] Remove Gradle wrapper from source distribution
- Remove
System.out.printlnfromDiffRepository -
DiffRepositoryshould write a test’s resource file only when it is modified - [CALCITE-4593]
DiffRepositorytests should fail if new XML resources are not in alphabetical order - [CALCITE-4587]
Set
spark.driver.bindAddressexplicitly to avoidBindExceptionthrown by Spark (Jiatao Tao) - Add Matcher#matches to ForbiddenApis to avoid its accidental use
- Apply com.autonomousapps.dependency-analysis plugin only when -PenableDependencyAnalysis is provided on a command line
- Fuzz testing for SEARCH operator, and refactor RexSimplify
- [CALCITE-4344]
Run
Redistests using Docker containers - Make sure FmppTask re-executes in case default_config.fmpp changes
- Use max-parallel=3 to reduce the usage of the shared GitHub Actions executors
- [CALCITE-4140] Use Wasabi S3 for remote build cache
- Use Sonatype OSSRH repository instead of JCenter in build plugins
- [CALCITE-4459] Verify the bytecode with Jandex by default
- [CALCITE-4470] Add optional bytecode verification with Jandex
- Cancel stale workflows in GitHub Actions CI
- Add ErrorProne and the Checker Framework verifications to Travis CI
- Test case for [CALCITE-1382]
ClassCastExceptionin JDBC Adapter - Require Java 1.8.0u202 or later for the build
- Make sure compileJava is re-executed in case of the minor javac version changes
- [CALCITE-4422]
Add
MethodCanBeStaticcheck via ErrorProne - [CALCITE-4199] Add CheckerFramework to GitHub Actions CI
- Add OpenJ9 1.8 CI job at GitHub Actions
- Add markdown to .gitattributes
- Set diff pattern for CSS files in .gitattributes
- Remove files that change often from Travis cache, remove broken files automatically
- Make buildSrc jars reproducible for better caching
- Refactor
SqlToRelTestBaseto allow customContextin tests - Exclude root project from javadoc aggregate tasks
- [CALCITE-4301]
Unit test
testCollectionsInnerValues()for Cassandra adapter is wrong (Alessandro Solimando) - Refactor
ResultSetEnumerableto avoid nested lambdas - [CALCITE-4314] Enable ErrorProne checking and resolve identified problems
Dependency version upgrade
- Bump commons-codec from 1.12 to 1.13 (Jaromir Hamala)
- [CALCITE-4528] Upgrade Avatica version to 1.18.0
- Bump Gradle 6.8.1 -> 6.8.3
- Update dependency declarations: adjust api vs implementation, remove unused ones
- [CALCITE-4506] Upgrade SQLLine to 1.11.0
- Bump checkerframework 3.9.1 -> 3.10.0, errorprone 2.4.0 -> 2.5.1
- Bump checkerframework 3.7 -> 3.9.1
- Bump Gradle 6.7 -> 6.8.1
- Bump AppVeyor image from 2017 to 2019 to test with newer Java: 1.8u162 -> 1.8u221, 13 -> 15
- Bump de.thetaphi.forbiddenapis from 2.7 to 3.1
- [CALCITE-4343] Bump Jedis from 2.9.0 to 3.3.0 (Tugdual Grall)
- [CALCITE-4339] Update Gradle: 6.6 -> 6.7
- Use jackson-bom to specify Jackson versions
Web site and documentation
- [CALCITE-4625] Update version in NOTICE, README, and howto.md
- [CALCITE-4601]
Invalid Javadoc URL in
SchemaFactoryof CSV adapter - Update release instructions
1.26.0 / 2020-10-06
This release comes about two months after 1.25.0. It includes more than 70 resolved issues, comprising a lot of new features and bug-fixes. Among others, it is worth highlighting the following.
- SEARCH operator and Sarg literal
- PIVOT operator in SQL
- Spatial index based on Hilbert space-filling curve
- Provide utility to visualize RelNode
- Support JDK 15 and Guava version 29.0-jre
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using JDK/OpenJDK versions 8 to 15; Guava versions 19.0 to 29.0-jre; other software versions as specified in gradle.properties.
Breaking Changes
- [CALCITE-2082] Do not store types or type factories inside operators
New features
- [CALCITE-4173]
Add internal
SEARCHoperator andSargliteral that represents a set of values or ranges - [CALCITE-3752]
Add
PIVOToperator to SQL - [CALCITE-1861] Spatial index, based on Hilbert space-filling curve
- [CALCITE-3920]
Improve
ORDER BYcomputation in Enumerable convention by exploitingLIMIT(Thomas Rebele) - [CALCITE-4015]
Pass through parent collation request on subset or superset of join keys for
EnumerableMergeJoin - [CALCITE-3782]
Bitwise functions
BIT_AND,BIT_ORandBIT_XORsupport binary and varbinary type (Hailong Wang) - [CALCITE-4197]
Provide utility to visualize
RelNodeplans (Liya Fan) - [CALCITE-4113]
Support
LEFT JOINinEnumerableMergeJoin
Bug fixes, API changes and minor enhancements
- [CALCITE-2833]
In JDBC adapter for Hive and BigQuery, implement
Valuesby generatingSELECTwithoutFROM(Stuti Gupta) - [CALCITE-4160]
Add configuration (
SqlToRelConverter.Config) to retainORDER BYin sub-query (Jiatao Tao) - [CALCITE-3399]
Field-pruning for set operators (except
UNION ALL) changes query semantics (Jin Xing) - [CALCITE-4182]
Support materialized view recognition when query has constant filter for missing columns in
GROUP BYlist of materialized view (Wang Yanlin) - [CALCITE-4171] Support named parameters for table window functions
- [CALCITE-4167]
Group by
COALESCE INthrowsNullPointerException - [CALCITE-4172] Expand columnar identifiers before resolving (James Starr)
- [CALCITE-4180] Support for Elasticsearch basic authentication (fageiguanbing)
- [CALCITE-4241] Some improvements to metadata query
- [CALCITE-4170]
Improve simplification of
<>predicates - [CALCITE-4159]
Simplify always-true expressions (such as
LIKE '%') toTRUE - [CALCITE-4192]
RelMdColumnOriginsgets the wrong index of group by columns afterRelNodewas optimized byAggregateProjectMergeRulerule (FangZheng Li) - [CALCITE-4203]
RelMdUniqueKeysshould not return empty when meetingIntersectandMinusif its input has unique keys - [CALCITE-4207]
Validation fails for positional aggregate with
CURRENT_DATEinCASEexpression - [CALCITE-4206]
RelDecorrelatoroutputs wrong plan for correlate sort with fetch limit - [CALCITE-4209]
In
RelBuilder, add an option to not simplifyLIMIT 0to an empty relation - [CALCITE-4208]
Improve metadata row count for
Join - [CALCITE-4210]
Replaying subqueries in
ONclauses (James Starr) - [CALCITE-4214]
Make
RelDataType.getSqlTypeNamenon-nullable - [CALCITE-4217]
Unlock
RelCrossType#getFieldCount() - [CALCITE-4220]
In
SqlToRelConverter, useRelBuilderfor creatingAggregate - [CALCITE-4226]
Add
Mappings#asListNonNullas a null-safe alternative forMappings#asList - [CALCITE-4237]
AssertionErrorinSqlTypeFactoryImpl.leastRestrictivewhen running slow tests - [CALCITE-4254]
ImmutableBeansshould make an immutable copy of property values of typeList,Set, orMap - [CALCITE-4249]
JDBC adapter cannot translate
NOT LIKEin join condition - [CALCITE-4266]
JDBC adapter throws
UnsupportedOperationExceptionif query contains range predicate on columns from sub-query - [CALCITE-4176]
Key descriptor can be optional in
SESSIONtable function - [CALCITE-4279]
SEARCHoperator cannot be pushed into Druid - [CALCITE-4280]
Replace Guava’s
Lists.transformandIterables.transformwithUtil.transform - [CALCITE-4282] Promote the window table functions window attribute data type with precision 3
- [CALCITE-4287]
AggregateJoinRemoveRuleandProjectJoinRemoveRuleare not fired if the last column of the join’s left input is referenced (Liya Fan) - [CALCITE-4238] Create a default parser configuration, to reduce redundant information in sub-parsers
- [CALCITE-4289]
Wrong signature for
SqlTumbleTableFunction - [CALCITE-4295]
Composite of two checkers with
SqlOperandCountRangethrowsIllegalArgumentException(Zhenghua Gao) - [CALCITE-4190]
ORsimplification incorrectly loses term - [CALCITE-4195] Cast between types with different collators must be evaluated as not monotonic
- [CALCITE-4200]
ExceptionInInitializerErrorwhen initializing DruidRules - [CALCITE-4201]
AssertionErrorwhen registering Druid rules due to conflict in description - [CALCITE-4221] Update stale integration tests in Druid adapter
- [CALCITE-4239]
RelMdUniqueKeysreturns wrong unique keys forAggregatewith grouping sets - [CALCITE-4271]
RelBuilder.inshould allow duplicate values - [CALCITE-4258]
SqlToRelConverter:SELECT 1 IS DISTINCT FROM NULLfails withAssertionError - [CALCITE-4246] When parsing SQL in BigQuery dialect, allow unquoted table names to contain hyphens
- [CALCITE-4230] When parsing SQL in BigQuery dialect, split quoted table names that contain dots
- [CALCITE-4247] When parsing SQL in BigQuery dialect, character literals may be enclosed in single- or double-quotes, and use backslashes as escapes
- [CALCITE-4215]
Ensure
org.apache.calcite.schema.StatisticusesnullvsemptyListappropriately - [CALCITE-4227]
ImmutableIntList#toArray(Integer[])should support arguments larger than the collection itself - [CALCITE-4228]
FlatLists.Flat6List#appendshould not throw NPE if there are null elements in the list - [CALCITE-4229]
Add Util.throwAsRuntimeandUtil.causeOrSelfto simplify exception re-throwing - [CALCITE-4269]
Improvement on enumerable implementation for
HOPandSESSION - [CALCITE-4275]
EnumerableMergeJoin#createdoes not setEnumerableConventionin the trait set - [CALCITE-4283]
Do not force implement
SqlTableFunctionwhen creating table function scan - [CALCITE-4261]
Join with three tables causes
IllegalArgumentExceptioninEnumerableBatchNestedLoopJoinRule - [CALCITE-4288]
Create
SqlTypeUtil#deriveType(SqlCallBinding)to make type computation simpler - [CALCITE-4216]
Make
org.apache.calcite.rel.type.RelDataType#getFamilynon-nullable - [CALCITE-4298] Avoid disabling hostname verification on HTTPS connections
- [CALCITE-4300]
EnumerableBatchNestedLoopJoindynamic code generation can lead to variable name issues if two EBNLJ are nested - [CALCITE-4224]
Add a method for
RelNodeto output its relational expression string (Jiatao Tao) - [CALCITE-4248]
Deprecate
SqlParser.ConfigBuilder - Remove
ArrayListallocation fromMappings#bijection, and add helpful message in case NPE is thrown - Improve positions in SQL validator error messages
- Simplify
Pair.left(Iterable)andPair.right(Iterable)implementation - Refactor
Paircomparison to useComparator.nullsFirstand.naturalOrder - Obsolete
SqlToRelConverter.ConfigBuilder, and refactorSqlToRelConverterTest - Refactor
SqlParserTest - Minor refactoring of
DruidAdapterITandDruidAdapter2IT
Build and test suite
- [CALCITE-4278] Add Druid adapter tests in GitHub CI
- [CALCITE-4259] Support JDK 15 and Guava version 29.0-jre
- [CALCITE-4184] Update Gradle: 6.3 -> 6.6
- [CALCITE-4168] Configure Gradle Local Build Cache
- [CALCITE-4185] Remove dependency between checkstyle and compilation tasks
- Add
MaxMetaspaceSize=512mto avoid metaspace issues when building Calcite - Make project buildable from folders that include special characters
- Use
merge=unionstrategy to avoid false merge conflicts onCalciteResource.properties - Add GC options to GitHub and Travis CI so they fail on low memory condition faster
- Update Checkstyle from 8.27 to 8.28 to support
package-infofiles with imports - Update
org.nosphere.apache.ratplugin from 0.5.2 to 0.7.0, and print files with unapproved licenses to console
Web site and documentation
- [CALCITE-3841] Change downloads page to use downloads.apache.org
- Fix documentation errors
- Site: Add Rui Wang as committer, Ruben Quesada Lopez as PMC
1.25.0 / 2020-08-22
This release comes shortly after 1.24.0 and removes methods which were deprecated in the previous version. It also introduces other breaking changes so make sure to consult corresponding section. Notable improvements in this release are:
-
Interval Expressions
(e.g.
INTERVAL '1' HOUR,INTERVAL -'1:2' HOUR TO MINUTE) - Character Literals as Aliases
- Refactor How Planner Rules are Parameterized
- Spacial Functions
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using Oracle JDK 8, 9, 10, 11, 12, 13, 14 and OpenJDK 8, 9, 10, 11, 12, 13, 14; Guava versions 19.0 to 28.2-jre; other software versions as specified in gradle.properties.
Breaking Changes
- [CALCITE-2569]
UDFs that are table functions must implement
SqlTableFunctionand haveCURSORas their return type - [CALCITE-3923] Refactor how planner rules are parameterized
- [CALCITE-4079]
Dialect constants in
SqlDialectcan cause class initialization deadlock - [CALCITE-4128] Remove dependency of File adapter on Example CSV adapter
New features
- [CALCITE-2160]
Spatial: Add functions
ST_MakeGridandST_MakeGridPoints - [CALCITE-4134] Interval expressions
- [CALCITE-4154]
Add a rule,
ProjectAggregateMergeRule, to merge aProjectonto anAggregate - [CALCITE-4080]
Allow character literals as column aliases, if
SqlConformance.allowCharLiteralAlias()
Bug fixes, API changes and minor enhancements
- [CALCITE-4139]
Prevent NPE in
ListTransientTable - [CALCITE-2854]
Codegen compile error when implementing unary minus function with data type
BigDecimal(Qi Yu) - [CALCITE-3957]
AggregateMergeRuleshould mergeSUM0intoCOUNTeven ifGROUP BYis empty - [CALCITE-4150]
JDBC adapter throws
UnsupportedOperationExceptionwhen generating SQL for untypedNULLliteral (Anton Haidai) - [CALCITE-4118]
RexSimplify might remove
CASTfrom RexNode incorrectly - [CALCITE-4145] Exception when query from UDF field with structured type
- [CALCITE-4081] Round-tripping a DECIMAL literal throws validation error
- [CALCITE-4132] Estimate the number of distinct values more accurately (Liya Fan)
- [CALCITE-4102] Some improvements to aggregate related operations (Liya Fan)
Build and test suite
- [CALCITE-4141] Make checkstyle tasks relocatable to support Gradle build cache
- [CALCITE-4137] Checkstyle should ensure that every class has a Javadoc comment
- [CALCITE-4156]
ReflectiveRelMetadataProviderconstructor should throw an exception (instead of assertion) when called with an empty map - [CALCITE-4022]
Support unparse special syntax for
INSERT(Xu Zhaohui) - [CALCITE-4115] Improve the prompt of using SQL keywords for sql parses (part2)
- [CALCITE-4129]
Support deep equality check for
RelNode - [CALCITE-4111]
Remove
VolcanoPlannerPhasein Planner (Jiatao Tao) - [CALCITE-4114]
Remove method
CalciteAssert.forceDecorrelate(Jiatao Tao)
1.24.0 / 2020-07-24
This release comes about two months after 1.23.0. It includes more than 80 resolved issues, comprising a lot of new features as well as performance improvements and bug-fixes. Among others, it is worth highlighting the following.
- Support top-down rule applying and upper bound space pruning
- Support OFFSET parameter in
TUMBLE/HOPtable functions - A new Presto dialect implementation
- Hoist, a utility to replace literals in a SQL string with placeholders
In this release, quite a few instance variables are deprecated and will be
removed before 1.25, such as EnumerableToBindableConverterRule.INSTANCE,
CassandraToEnumerableConverterRule.INSTANCE and so on. Besides, some methods
in RelNode are changed from ‘to removed before 2.0’ to ‘to be removed before 1.25’,
including isDistinct(), isKey(ImmutableBitSet), getQuery(), getRows(),
getVariablesStopped(), computeSelfCost(), isValid(boolean), getCollationList(),
getChildExps(). All deprecated APIs are strongly recommended to be replaced by their
replacements as soon as possible(CALCITE-3923,
CALCITE-4079).
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using Oracle JDK 8, 9, 10, 11, 12, 13, 14 and OpenJDK 8, 9, 10, 11, 12, 13, 14; Guava versions 19.0 to 28.2-jre; other software versions as specified in gradle.properties.
Breaking Changes
- [CALCITE-4032]
Mark
CalcMergeRuleasTransformationRule. With this change, theCalcMergeRulewon’t matchPhysicalNode(includingEnumerableCalc) inVolcanoPlanner - [CALCITE-4003]
Disallow cross convention matching and
PhysicalNodegeneration inTransformationRule - [CALCITE-3786]
Change
RelNode#recomputeDigest()return type fromStringtovoid
New features
- [CALCITE-4000]
Support
OFFSETparameter inTUMBLE/HOPtable functions (Rui Wang) - [CALCITE-3916] Support top-down rule applying and upper bound space pruning
- [CALCITE-3941] Add the default strict mode to the path in the Json functions
- [CALCITE-3724] Presto dialect implementation
- [CALCITE-3946]
Add parser support for
MULTISET/SETandVOLATILEmodifiers inCREATE TABLEstatements (Drew Schmitt) - [CALCITE-4089]
In Babel, allow
CAST(integer AS DATE)even though it is illegal in Calcite SQL - [CALCITE-4087]
Hoist, a utility to replace literals in a SQL string with placeholders
Bug fixes, API changes and minor enhancements
- [CALCITE-4073]
Add a new component
RexNormalizefor more effect rex nodes normalization - [CALCITE-3224]
New implementation of
RexNode-to-Expressioncode generation - [CALCITE-4056]
Remove
DigestfromRelNodeandRexCall - [CALCITE-4008]
Implement Code generation for
EnumerableSortedAggregate(Rui Wang) - [CALCITE-3972]
Allow
RelBuilderto createRelNodewith convention (Xiening Dai) - [CALCITE-4060]
Supports implicit type coercion for
NOT IN - [CALCITE-4127]
Remove final from
AbstractRelNode#getRelTypeName - [CALCITE-4124]
Stop invalidating metadata cache in
VolcanoRuleCall - [CALCITE-4123]
Make
EnumerableMergeJoinconstructor protected - [CALCITE-4085]
Improve return type nullability for
SqlDotOperator&SqlItemOperator(Dawid Wysakowicz) - [CALCITE-3936]
JDBC adapter, when generating SQL, changes target of ambiguous
HAVINGclause with aProjectonFilteronAggregate - [CALCITE-4112]
Refine the usage of
CalciteConnectionConfiginDecorrelateProgram& some minor code refactoring (Jiatao Tao) - [CALCITE-4116]
Remove unused code for tracking
RexNode’s nullable state in codegen - [CALCITE-4105]
Replace
PairwithFlat2ListinRelDigestWriter - [CALCITE-4092]
NPEusingWITHclause without a correspondingSELECT FROM(James Kim) - [CALCITE-4115] Improve the prompt of using SQL keywords for sql parser
- [CALCITE-4094]
Allow
SqlOperatorofSqlKind#OTHER_FUNCTIONto define aStrong.Policy - [CALCITE-3834]
Support
AntiJoininEnumerableMergeJoin - [CALCITE-4098]
Remove redundant code in
RelJson.toJson(RelDistribution)(Jiatao Tao) - [CALCITE-4066]
SqlTypeUtil#convertTypeToSpeccoverArray/Multiset/Rowtypes (Jiatao Tao) - [CALCITE-4059]
SqlTypeUtil#equalSansNullabilityconsiderArray/Maptype (Jiatao Tao) - [CALCITE-4026]
CassandraFilterhas generated wrong condition expression for filter with non string literal (Wenhui Tang) - [CALCITE-4077] Exception when joined with built-in table functions
- [CALCITE-4097] Avoid requesting unnecessary trait request when deriving traits
- [CALCITE-4033]
Does not produce parenthesized table expressions for
UNNEST(Rui Wang) - [CALCITE-4049] Improve the implementation of the shortest-path algorithm
- [CALCITE-3929]
When deserialize UDAF aggregate call from json string, throws
NPE(Xu Zhaohui) - [CALCITE-4062] Support deserialize UDF array type from json string (Xu Zhaohui)
- [CALCITE-4090]
When generating SQL for DB2, a complex
SELECTabove a sub-query generates a bad table alias (Steven Talbot) - [CALCITE-4083]
RelTraitSetfailed to canonize traits - [CALCITE-4019]
Visit
SqlInsertwithSqlShuttlecauseNullPointerException(Xu ZhaoHui) - [CALCITE-4063]
Unnest an array of single-item structs causes
ClassCastException - [CALCITE-3907] Use username and password parameters on delegation
- [CALCITE-3951]
Support different string comparison based on
SqlCollation - [CALCITE-4020]
Support
Calcoperator inRelFieldTrimmer(Xu Zhaohui) - [CALCITE-4057]
Support trait propagation for
EnumerableBatchNestedLoopJoin(Rui Wang) - [CALCITE-4016]
Support trait propagation for
EnumerableCalc - [CALCITE-4055]
RelFieldTrimmerloses hints - [CALCITE-3975]
Add options to
ProjectFilterTransposeRuleto push down project and filter expressions whole, not just field references - [CALCITE-4038]
Refactor
RexVisitor,RexBiVisitor,RelOptUtil.InputFinder - [CALCITE-4053]
RexSimplifyshould not pass exprs containing non-const subExprs toRexExecutor(Shuo Cheng) - [CALCITE-4018]
Support trait propagation for
EnumerableValues - [CALCITE-4049] Reduce the time complexity of getting shortest distances
- [CALCITE-4041]
Support trait propagation for
EnumerableCorrelate - [CALCITE-4007]
MergeJoincollation check should not be limited to join key’s order - [CALCITE-4012]
Support trait propagation for
EnumerableHashJoinandEnumerableNestedLoopJoin(Rui Wang) - [CALCITE-4040] An aggregate function that does not support roll up throws an exception when it is rolled up (Xu Zhaohui)
- [CALCITE-4030]
Reinstate assertion check for trait derivation in
OptimizeTask - [CALCITE-4042]
JoinCommuteRulemust not matchSEMI/ANTIjoin - [CALCITE-4043]
Improve
IllegalArgumentExceptionmessage inRelBuilder#field - [CALCITE-3991]
The required should always be provided in
RelSet.getOrCreateSubset()(Botong Huang) - [CALCITE-3981]
Volcano.registershould not return stale subset (Botong Huang) - [CALCITE-2997]
In
SqlToRelConverterandRelBuilder, add option to avoid pushing down join condition - [CALCITE-4023]
Deprecate
ProjectSortTransposeRule - [CALCITE-4031] Remove code to be removed before 1.24
- [CALCITE-3993]
Add utility methods to
RelTrait,RelTraitSetandRelCollation - [CALCITE-4011]
Support trait propagation for
EnumerableProjectandEnumerableFilter(Rui Wang) - [CALCITE-4019]
Visit
SqlInsertwithSqlShuttlecauseNullPointerException(Xu ZhaoHui) - [CALCITE-4004]
Show
RelOptRuleOperanddescription in debugger to facilitate debugging - [CALCITE-4009]
Remove traitset remapping in
ProjectJoinTransposeRule - [CALCITE-3999]
Simplify
DialectPoolimplementation using Guava cache - [CALCITE-3910]
Enhance
ProjectJoinTransposeRuleto supportSemiJoinandAntiJoin(Liya Fan) - [CALCITE-3988]
Intersect in
RelMdRowCountdoesn’t take into accountintersect all(Xu Zhaohui) - [CALCITE-3985] Simplify grouped window function in parser (Rui Wang)
- [CALCITE-4086] Upgrade Avatica version to 1.17.0
Build and test suite
- [CALCITE-4075] Mock table ‘EMPNULLABLES’ should allow nulls in all non-pk columns
- [CALCITE-4101]
Calcite PR CI often failed due to
elasticsearch:test, disable the related tests first (Jiatao Tao) - [CALCITE-4061] Build should fail if Calcite code uses deprecated APIs
- [CALCITE-4104] Add automatically link to GitHub PR and ‘pull-request-available’ label to issues
- [CALCITE-3478] Restructure tests for materialized views (Jin Xing)
Web site and documentation
- [CALCITE-3950]
Doc of
SqlGroupingFunctioncontradicts its behavior - Site: Remove ‘(for Calcite committers)’ suffix from headers in section dedicated to committers
- Site: Add instructions for managing Calcite repos through GitHub
- Site: Add Tencent and TBDS logo in powered-by image
1.23.0 / 2020-05-23
This release comes two months after 1.22.0. It includes more than 100 resolved issues, comprising a lot of new features as well as performance improvements and bug-fixes. For some complex queries, the planning speed can be 50x or more faster than previous versions with built-in default rule set. It is also worth highlighting the following.
-
VolcanoPlannersupports top down trait request and trait enforcement without abstract converter (CALCITE-3896) - Improve
VolcanoPlannerperformance by removing rule match and subset importance (CALCITE-3753) - Improve
VolcanoPlannerperformance when abstract converter is enabled (CALCITE-2970) - Support ClickHouse dialect (CALCITE-2157)
- Support
SESSIONandHOPTable function (CALCITE-3780, CALCITE-3737)
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using Oracle JDK 8, 9, 10, 11, 12, 13, 14 and OpenJDK 8, 9, 10, 11, 12, 13, 14; Guava versions 19.0 to 28.2-jre; other software versions as specified in gradle.properties.
Breaking Changes
- [CALCITE-3877]
In
RexWindow, make fieldsupperBoundandlowerBoundnot-nullable - [CALCITE-3868]
Remove redundant
ruleSet(protected)andruleNames(private) inVolcanoPlanner - [CALCITE-3753]
VolcanoPlannerflagsimpatientandambitiousare removed, alternatively usecheckCancel()to achieveimpatientmode - [CALCITE-3997]
In
VolcanoPlanner, transformation rules won’t match with Enumerable physical operators - [CALCITE-3825]
Split
AbstractMaterializedViewRuleinto multiple classes (addendum)
New features
- [CALCITE-3896]
VolcanoPlannersupports top down trait request and trait enforcement without abstract converter - [CALCITE-3780]
Support
SESSIONTable function (Rui Wang) - [CALCITE-3737]
Support
HOPTable function (Rui Wang) - [CALCITE-3789]
Support Presto style
unnestwith items alias (Will Yu) - [CALCITE-2157] Support ClickHouse dialect (Chris Baynes)
- [CALCITE-3833]
Support
SemiJoininEnumerableMergeJoin - [CALCITE-3684]
Support
CONCATfor variable arguments (Wenhui Tang) - [CALCITE-3285]
EnumerableMergeJoinsupport non-equi join conditions - [CALCITE-3694]
Implement
SINHfunction - [CALCITE-3647]
Support MySQL
COMPRESSfunction (ritesh-kapoor) - [CALCITE-3726] Allow declaring type objects (ritesh-kapoor)
- [CALCITE-3815]
Support SQL standard aggregate functions:
EVERY,SOME,INTERSECTION - [CALCITE-3704]
Implement
STRCMPfunction
Bug fixes, API changes and minor enhancements
- [CALCITE-3984]
Support
Exchangeoperator inRelFieldTrimmer(Xu Zhaohui) - [CALCITE-3971]
Support
CalcinRelMdColumnOrigins(Xu ZhaoHui) - [CALCITE-3921]
Support
TableModifyjson serialization and deserialization (Wang Yanlin) - [CALCITE-3938]
Support
LogicalCalcinRelShuttle(dz) - [CALCITE-3880]
Add
SortExchangesupport toRelFieldTrimmer(Krisztian Kasa) - [CALCITE-3867]
Support
RelDistributionjson serialization (Krisztian Kasa) - [CALCITE-3634]
Add
IntersectOnCalcsToIntersectUnifyRulefor materialized view recognition (dz) - [CALCITE-3934]
Allow type-coercion in
CONCAToperator - [CALCITE-3889]
Add
apply(Mappings.Mapping)toRelTraitandRelTraitSet - [CALCITE-3838]
Support
CalcinRelMdSize,RelMdSelectivity,RelMdMaxRowCount,RelMdMinRowCount,RelMdTableReferences - [CALCITE-3718]
Support
IntersectandMinusinBindables(xzh) - [CALCITE-3997] Logical rules matched with physical operators but failed to handle traits
- [CALCITE-3979] Simplification might have removed CAST expression(s) incorrectly
- [CALCITE-3968] TPC-H queries take forever for planning
- [CALCITE-3877]
In
RexWindow, make fieldsupperBoundandlowerBoundnot-nullable - [CALCITE-3969] Trait keys remapping may throw exception when some trait key is not mapped (Roman Kondakov)
- [CALCITE-3982]
Simplify
FilterMergeRuleto rely onRelBuilderinstead ofRexProgram - [CALCITE-3983]
Add utility methods to
RelTraitSet - [CALCITE-3980]
Redis-adapter redis connection is not reused when
RedisTableis created (Xu Zhang) - [CALCITE-3961]
VolcanoPlanner.prunedNodesinfo is lost when duplicateRelNodeis discarded (Botong Huang) - [CALCITE-3866] “numeric field overflow” when running the generated SQL in Postgres (Wenhui Tang)
- [CALCITE-3926]
CannotPlanExceptionwhen an empty LogicalValues requires a certain collation - [CALCITE-3973] Hints should not unparse as enclosed in parentheses (Alex Baden)
- [CALCITE-3887]
FilterandJoinconditions may not need to retain nullability during simplifications - [CALCITE-3966]
Trigger rules for existing
RelSubsetwhen it becomes delivered - [CALCITE-3928] Trim unused fields before materialized view matching (dz)
- [CALCITE-3962]
Make
JSON_VALUEoperands varadic - [CALCITE-3827] Reduce the time complexity of finding in-edges of a vertex in the graph (Liya Fan)
- [CALCITE-3878]
Create
ArrayListwith initial capacity when size is known (Xu Zhang) - [CALCITE-3949]
RelDistributions.of()andRelCollations.of()should canonize trait instance - [CALCITE-3954] Always compare types using equals
- [CALCITE-3955]
Remove the first operand of
RexCallfromSqlWindowTableFunction - [CALCITE-3915]
Add rule listener to report rule attempts and time at
DEBUGlog level (Xiening Dai) - [CALCITE-3948]
RelSubsetmatching is not properly handled inVolcanoRuleCall(Botong Huang) - [CALCITE-3758]
FilterTableScanRulegenerate wrong mapping for filter condition when underlying isBindableTableScan(Jin Xing) - [CALCITE-3942]
Move type-coercion configurations into
SqlValidator.Config - [CALCITE-3939]
Change
UnionEliminatorRuleandProjectRemoveRuleto auto pruningSubstitutionRule(Botong Huang) - [CALCITE-3944]
Move
dumpSetsanddumpGraphvizout ofVolcanoPlanner - [CALCITE-3927]
RelSubsetis not fired for rule when set gets merged (Botong Huang) - [CALCITE-3868]
Remove redundant
ruleSet(protected)andruleNames(private) in VolcanoPlanner - [CALCITE-3940]
Hintitem can not parse correctly if the name is right after token /*+ - [CALCITE-3447] MutableScans with the same qualified name are not equivalent (Dai Min,Jin Xing)
- [CALCITE-3931]
Add LOOKAHEAD(2) for methods defined in
createStatementParserMethods - [CALCITE-3790] Make the url() of Sources.of(file) available
- [CALCITE-3894]
SET operation between
DATEandTIMESTAMPreturns a wrong result - [CALCITE-3881]
SqlFunctions#addMonthsyields incorrect results in some corner case (Zhenghua Gao) - [CALCITE-3324]
Set
updateCountwhen creatingMetaResultSet(Robert Yokota) - [CALCITE-3733]
In JDBC adapter, when generating SQL for MySQL, generate
TIMESTAMPtype asDATETIMEforCAST(Vineet Garg) - [CALCITE-3909]
RelMdMinRowCountdoesn’t take into accountUNIONDISTINCT - [CALCITE-3576]
Remove enumerable convention check in
FilterIntoJoinRule - [CALCITE-2593] Plan error when transforming multiple collations to single collation
- [CALCITE-2010]
Cannot plan query that is
UNION ALLapplied toVALUES - [CALCITE-3865]
RelCollationTraitDef.canConvertshould always return true - [CALCITE-2970]
Improve
VolcanoPlannerperformance when enabling abstract converter - [CALCITE-3914]
Improve
SubstitutionVisitorto considerRexCallof typePLUSandTIMESfor canonicalization (Vineet Garg) - [CALCITE-3912] Incorrect mapping parsing when properties have same name as reserved keywords in ElasticSearch
- [CALCITE-3900]
Add
ConfigforSqlValidator - [CALCITE-3908]
JoinCommuteRuleshould update all input references in join condition - [CALCITE-3898]
RelOptPredicateListmay generate incorrect map of constant values - [CALCITE-3835] Overloaded table functions fail with an assertion error if param types differ
- [CALCITE-3851] Replace the node importance map with a set for pruned nodes
- [CALCITE-3872] Simplify expressions with unary minus
- [CALCITE-3814] Support JDK 14 and guava 28.2-jre
- [CALCITE-3876]
RelToSqlConvertershould not merge aProjectthat contains a window function that references a window function in inputProject - [CALCITE-3891]
Remove use of Pair.zip in
RelTraitSet - [CALCITE-3885] Restore trace logging for rules queue and Volcano planner’s internal state (Roman Kondakov)
- [CALCITE-3886] Execute substitution rule according to the order they get matched
- [CALCITE-3882]
Remove duplicated code from
SqlTypeAssignmentRule(Wenhui Tang) - [CALCITE-3846]
EnumerableMergeJoin: wrong comparison of composite key with null values - [CALCITE-3829]
MergeJoinEnumeratorshould not use inputs enumerators until it is really required - [CALCITE-3840]
Re-aliasing of
VALUESthat has column aliases produces wrong SQL in the JDBC adapter - [CALCITE-3810]
Render
ANTIandSEMIjoin toNOT EXISTSandEXISTSin the JDBC adapter. Also add forgottenIS_DISTINCT_FROMtranslation support - [CALCITE-3852]
RexSimplifydoesn’t simplify NOT EQUAL predicates - [CALCITE-3862]
Materialized view rewriting algorithm throws
IndexOutOfBoundsException(Vineet Garg) - [CALCITE-3856] Remove code to be removed before 1.23
- [CALCITE-3855] Supports snapshot on table with virtual columns during sql-to-rel conversion
- [CALCITE-3853]
Minor improvements in
SortJoinCopyRule - [CALCITE-3848]
Rewriting for materialized view consisting of group by on join keys fails with
Mappings$NoElementException(Vineet Garg) - [CALCITE-3845]
CASE WHENexpression with nullabilityCASTis considered as reduced wrongly inReduceExpressionsRule - [CALCITE-3847] Decorrelation for join with lateral table outputs wrong plan if the join condition contains correlation variables
- [CALCITE-3753]
Boost
VolcanoPlannerperformance by removing rule match and subset importance - [CALCITE-3823]
Do not use
String.replaceAll - [CALCITE-3412] FLOOR(timestamp TO WEEK) gives wrong result
- [CALCITE-3839]
After calling
RelBuilder.aggregate, cannot lookup field by name - [CALCITE-3819]
Prune parent
RelNodewhen merging childRelSetwith parentRelSet - [CALCITE-3809]
RexSimplifysimplifies nondeterministic function incorrectly - [CALCITE-3828] MergeJoin throws NPE in case of null keys
- [CALCITE-3820]
EnumerableDefaults#orderByshould be lazily computed + support enumerator re-initialization - [CALCITE-3837] AntiJoin with empty right input can always be transformed as its left input
- [CALCITE-3821]
RelOptUtil::containsMultisetOrWindowedAggdoesn’t really check multiset (Xiening Dai) - [CALCITE-3825]
Split
AbstractMaterializedViewRuleinto multiple classes (addendum) - [CALCITE-3824]
JoinProjectTransposeRuleshould skip Projects containing windowing expression (Vineet Garg) - [CALCITE-3734] MySQL JDBC rewrite is producing queries with CHAR with range beyond 255 (Vineet Garg)
- [CALCITE-3817]
VolcanoPlannerdoes not remove the entry in ruleNames when removing a rule - [CALCITE-2592]
EnumerableMergeJoinis never taken
Build and test suite
- [CALCITE-3965]
Avoid
DiffRepositorylock contention - [CALCITE-3924]
Fix flakey test to handle
TIMESTAMPandTIMESTAMP(0)correctly (neoReMinD) - [CALCITE-3888] Switch avatica-server to be test dependency for core
- [CALCITE-3660]
Disable flaky test
PigRelBuilderStyleTestsince it fails too often for no reason - [CALCITE-3892] Make junit test classes and methods non-public where possible
- Update release-plugins: 1.65 -> 1.70
- Avoid failures in SourceTest when filesystem does not support unicode paths
- Add AvoidStarImport Checkstyle rule
- The release tag should be ‘calcite-N.N’ not ‘vN.N’
Web site and documentation
- [CALCITE-3958]
Revise documentation of gradle.properties in Cassandra/Piglet and
SubstitutionVisitor(xzh) - [CALCITE-3726] Documentation for Declaring Objects For Types Defined In Schema (ritesh-kapoor)
- Site: Add Ant Financial logo in powered-by image (Wang Yanlin)
- Site: Change affiliation of Stamatis Zampetakis
- Site: Add Forward Xu, Jin Xing, Wang Yanlin, as committers
- Site: Add Vineet Garg as committer
- Site: Add Feng Zhu as committer
1.22.0 / 2020-03-05
This release comes five months after 1.21.0. It includes more than 250 resolved issues, comprising a large number of new features as well as general improvements and bug-fixes. Among others, it is worth highlighting the following.
- Support SQL hints for different kind of relational expressions
- A new Redis adapter
- Support Oracle XML functions and MySQL math functions
We have also fixed some important bugs:
- Merging
RelSetsometimes gave inconsistent state, - The
GROUP_IDfunction gave incorrect results, - Improve row count estimate for Correlate relational expression,
- When applying the MOD operation to DECIMAL values the inferred type was incorrrect.
Compatibility: This release is tested on Linux, macOS, Microsoft Windows; using Oracle JDK 8, 9, 10, 11, 12, 13 and OpenJDK 8, 9, 10, 11, 12, 13; Guava versions 19.0 to 27.1-jre; Apache Flink 1.10.0; other software versions as specified in gradle.properties.
Breaking Changes
- Constructors for
Project,TableScan,Calc,AggregateandJoinintroduce new parameter namedhints(CALCITE-482) - Logical
RelNode’screatemethod need to pass in hints explicitly (CALCITE-3723) -
Projectnames will not represent inRelNodedigest anymore (CALCITE-3713) -
RexCalls are default to be normalized in theRelNodedigest (CALCITE-2450) -
RelBuilder.aggregatenow would prune the unused fields from the input, thus the plan may change (CALCITE-3763) -
RelBuilder.scanand sql-to-rel conversion always invokeRelOptTable.toRelnow, so there may be some plan changes for theTableScannode if yourRelOptTable.toRelreturns a physical rel before
New features
- [CALCITE-3771]
TRIMSupport for HIVE/SPARK Dialect (Dhirenda Gautam) - [CALCITE-3707] Implement
COSHfunction - [CALCITE-3695] Implement
TANHfunction - [CALCITE-3640] Oracle
EXISTSNODEFunction Support (ritesh-kapoor) - [CALCITE-3382] Support
TUMBLEas Table Value Function (Rui Wang) - [CALCITE-3510] Implement Redis adapter
- [CALCITE-3684] Implement
CBRTfunction (Qianjin Xu) - [CALCITE-3663] Support for
TRIMfunction in BigQuery Dialect - [CALCITE-3580] Oracle
EXTRACT(XML)Function Support (ritesh-kapoor) - [CALCITE-3579] Oracle
XMLTRANSFORMFunction Support (ritesh-kapoor) - [CALCITE-3591] Add bit_xor aggregate operator (wangxlong)
- [CALCITE-3552] Support MySQL
ExtractValuefunction - [CALCITE-3542] Implement
RepeatUnionAll=false - [CALCITE-482] Implement sql and planner hints
- [CALCITE-3781]
HintStrategycan specify excluded rules for planner - [CALCITE-3730] Add hints to
RelBuilder - [CALCITE-3719] Add hint option checker to customize the option
- [CALCITE-3631] Support SQL hints for
Calc - [CALCITE-3590] Support SQL hints for
Aggregate(Shuo Cheng) - [CALCITE-3584] Propagate hints when decorrelating a query
- [CALCITE-3736] Add an interface in
RelOptRuleCallto customize the propagation of hints before registering into planner rule - [CALCITE-3496] Hive dialect and MS SQL dialect support with cube and with rollup (dz)
- [CALCITE-3465] Add support for missing Cassandra 3.x data types (Alessandro Solimando)
- [CALCITE-3442] In ElasticSearch adapter, set
stored_fields = _none_to prohibit FetchPhase get involved (Yunfeng,Wu) - [CALCITE-3437] Support
MatchQueryin ElasticSearch adapter (Shlok Srivastava) - [CALCITE-3434] ElasticSearch schema with pathPrefix (Jeffery Zhang)
- [CALCITE-3405] Prune columns for
ProjectableFilterableTablewhenProjectis not simple mapping (Jin Xing) - [CALCITE-3349] Add
CREATE FUNCTIONandDROP FUNCTIONddl (Zhenqiu Huang) - [CALCITE-3323] Add mode to
SqlValidatorthat treats statements as valid if they contain unknown functions (Ryan Fu) - [CALCITE-3302] Implement
CLASSIFIERandLASTfunctions forMATCH_RECOGNIZE - [CALCITE-3112] Support
WindowinRelToSqlConverter(Wenhui Tang)
Bug fixes, API changes and minor enhancements
- Following CALCITE-3769: Add BindableTableScanRule into the default ruleset
- [CALCITE-3826]
UPDATEassigns wrong type to bind variables - [CALCITE-3830] The ‘approximate’ field should be considered when computing the digest of
AggregateCall - [CALCITE-3807] checkForSatisfiedConverters() is unnecessary
- [CALCITE-3803] Enhance
RexSimplifyto simplify ‘a>1 or (a<3 and b)’ to ‘a>1 or b’ if column a is not nullable - [CALCITE-2707] Information about distinct aggregation is lost in
MATCH_RECOGNIZE - [CALCITE-3801] Deprecate
SqlToRelConverter.Config#isConvertTableAccess - [CALCITE-3791]
HepPlannerdoes not clear metadata cache for the ancestors of discarded node when a transformation happens - [CALCITE-3794]
RexSimplifyshould return early if there is no pulled up predicate when simplifying using predicates - [CALCITE-3798] Make
RelBuilderview expander pluggable - [CALCITE-3769] Deprecate
TableScanRule - [CALCITE-3774] In
RelBuilderandProjectMergeRule, prevent merges when it would increase expression complexity - [CALCITE-3763]
RelBuilder.aggregateshould prune unused fields from the input, if the input is aProject - Add
RelBuilder.transform, which allows you to clone aRelBuilderwith slightly different Config - [CALCITE-3785]
HepPlanner.belongToDag()doesn’t have to use mapDigestToVertex (Xiening Dai) - [CALCITE-3783]
PruneEmptyRules#JOIN_RIGHT_INSTANCEwrong behavior forJoinRelType.ANTI - [CALCITE-3773] Wrong parameter in
EnumerableMergeJoin::create`method - [CALCITE-3768]
VolcanoPlanner.changeTraitsUsingConverters()has parameter that’s never used - [CALCITE-3766] Add a Builder to
RelHint - [CALCITE-3765] Returns early when there is an existing operand when assigning operands solve order
- Switch
RelBuilder.Configto an interface, and deprecateRelBuilder.ConfigBuilder - [CALCITE-3764]
AggregateCaseToFilterRulehandlesNULLvalues incorrectly - [CALCITE-1824]
GROUP_IDreturns wrong result (DonnyZone) - [CALCITE-3756]
RelSubsetshould not matchoperand(RelNode.class) - [CALCITE-3738] Missing order by logical plan for
INSERTstatement - [CALCITE-3676]
VolcanoPlanner.dumpGraphvizshould handle exception gracefully (Qianjin Xu) - [CALCITE-3653] Support
TableModifyinToLogicalConverter(dz) - [CALCITE-3668]
VolcanoPlannerdoes not match all theRelSubSetin matchRecursive - [CALCITE-3744] Duplicate rule matches when
RelSetgets merged - [CALCITE-3747] Constructing
BETWEENwithRelBuilderthrows class cast exception - Add HSQLDB data sets (scott, foodmart and chinook) to SQLLine’s path
- [CALCITE-3735] In
ImmutableBeans, allow interfaces to have default methods - [CALCITE-3736] Add an interface in
RelOptRuleCallto customize the propagation of hints before registering into planner rule - [CALCITE-3721]
Filterof distinct aggregate call is lost after applyingAggregateExpandDistinctAggregatesRule(Shuo Cheng) - [CALCITE-3644] Add
ProjectSetOpTransposeRuleto normalize materialized view (xy2953396112) - Add method
Pair.forEach(Iterable, Iterable, BiConsumer) - Really deprecate
RelBuilder.groupKey(ImmutableBitSet, ImmutableList<ImmutableBitSet>) - [CALCITE-3729] Filters failed to be pushed down when it’s identical to join condition (Jin Xing)
- [CALCITE-3725]
RelMetadataTestfails with NPE due to unsafeRelMetadataQuery.instancecall (Jin Xing) - [CALCITE-3675] SQL to Rel conversion is broken for coalesce on nullable field (DonnyZone)
- Refine rules so they produce less no-op matches
- Refine logging dependencies: keep slf4j bridges in runtime classpath only
- Refine
RuleQueue#addMatch: skip the match if it is not required for the phase - [CALCITE-3364]
ClassCastExceptionif group by is used on the result of scalar valued table function (DonnyZone) - [CALCITE-3722] Add
Hook#PLAN_BEFORE_IMPLEMENTATIONto capture the plan after optimization - [CALCITE-3713] Remove column names from
Project#digest - [CALCITE-2450] Reorder
RexCallpredicates to a canonical form validation - [CALCITE-3677] Add assertion to
EnumerableTableScanconstructor to validate if the table is suitable for enumerable scan - [CALCITE-3715] Add an interface to pass the table hints to
RelOptTable - [CALCITE-3714]
BitString.createFromBytesreverses order of the bits in each byte - [CALCITE-3712] Optimize lossless casts in
RexSimplify: CAST(CAST(intExpr as BIGINT) as INT) => intExpr - [CALCITE-3587]
RexBuildermay lose decimal fraction for creating literal withDECIMALtype (Wang Yanlin) - [CALCITE-3658]
TableModifyofUpdatecontains correlated variable by mistake (Jin Xing) - [CALCITE-3711]
Correlateshould overrideestimateRowCount - [CALCITE-3606] Derive target table column list by mistake when convert
TableModifyto Sql string (JinXing) - [CALCITE-3526]
SqlPrettyWritershould have options to fold/chop long lines, print leading commas - [CALCITE-3328] Immutable beans, powered by reflection
- [CALCITE-3672] Support implicit type coercion for insert and update
- [CALCITE-3651] NPE when convert relational algebra that correlates
TableFunctionScan(Wang Yanlin) - [CALCITE-3666] Refine
RelMdColumnUniquenessandRelMdUniqueKeysforCalc - [CALCITE-3655]
SortJoinTransposeRulemust not push sort intoProjectthat containsOVERexpressions - [CALCITE-3649] Hints should be propagated correctly in planner rules if original node is transformed to different kind
- [CALCITE-3563] When resolving method call in calcite runtime, add type check and match mechanism for input arguments (DonnyZone)
- [CALCITE-3621] Push down sort to DB, SQL of
Sortrel contains explicit field name instead of * (Lei Jiang) - [CALCITE-3652] Add org.apiguardian:apiguardian-api to specify API status
- [CALCITE-3632] Add IntersectToIntersectUnify Rule in SubstitutionVisitor (xy2953396112)
- [CALCITE-3643] Prevent matching
JoinCommuteRulewhen both inputs are the same - [CALCITE-3630] Improve
ReduceExpressionsRule - [CALCITE-3607] Support
LogicalTableModifyin RelShuttle (xy2953396112) - [CALCITE-3618] ProjectToWindowRule - correct isDependent checking (lxian2shell)
- [CALCITE-3635] Supports hint option as string or numeric literal
- [CALCITE-3525]
RexSimplify: eliminate redundant rex calls in OR - [CALCITE-3620] Remove implicit lateral operator for temporal table join
- [CALCITE-3387] Query with GROUP BY and JOIN … USING wrongly fails with “Column DEPTNO is ambiguous” error
- [CALCITE-3604] Fixing
SqlXmlFunctionsTestlocale (ritesh-kapoor) - [CALCITE-3608] Promote
RelOptUtil.createCastRelto not create new projection if the input rel is already a project - [CALCITE-3603]
SqlLateralOperator’s unparse add additional keywordLATERALwhen the inner operator isSqlSnapshot - [CALCITE-3599] Override toString() of
RexRangeRefto avoid null string - [CALCITE-3598]
EnumerableTableScan: wrongJavaRowFormatfor elementType String - [CALCITE-3575] IndexOutOfBoundsException when converting sql to rel
- [CALCITE-3462] Add projectExcept method in
RelBuilderfor projecting out expressions - [CALCITE-3535]
EnumerableJoinRule: remove unnecessaryFilteron top ofINNERJoin - [CALCITE-3520] Type cast from primitive to box is not correct (DonnyZone)
- [CALCITE-3481] Support convert
TableFunctionScantoSqlNode(Wang Yanlin) - [CALCITE-3565] Explicitly cast assignable operand types to decimal for udf (DonnyZone)
- [CALCITE-3547] SqlValidatorException because Planner cannot find UDFs added to schema (Chenxiao Mao)
- [CALCITE-3246] NullPointerException while deserializing udf operator (Wang Yanlin)
- [CALCITE-3429] AssertionError for user-defined table function with map argument (Wang Yanlin)
- [CALCITE-3560] Additional calcite.util.Source implementation for generic text source (eg. CharSource)
- [CALCITE-3550] Make
SqlTypeAssignmentRulesconversion mapping pluggable - [CALCITE-3546] Improve
EnumerableDefaultsnested loop join Provide a new implementation of nested loop join that, unlike the existing one, does not require to build the complete result as a list before returning it. Instead, it iterates through the outer and inner enumerables and returns the results step by step. - [CALCITE-3281] Support mixed Primitive types for
BinaryExpressionevaluate method (Wang Yanlin) - [CALCITE-3561] Support using unnest in
Interpreter(Wang Yanlin) - [CALCITE-3566]
EnumerableIntersectandEnumerableMinusconvert to Logical (xzh_dz) - [CALCITE-3567] Unnest support Map wrapped with
RecordType(Wang Yanlin) - [CALCITE-3569] IndexOutOfBoundsException when pushing simplified filter to view
- [CALCITE-3536] NPE when executing plan with
Coalescedue to wrong NullAs strategy (Jin Xing) - [CALCITE-3355] Deduce whether
CASEandCOALESCEmay produce NULL values - [CALCITE-3473] Getting unique result for table scan should contain key column(s) (Wang Yanlin)
- [CALCITE-3544]
RexSimplifydoes not exploit all known predicates - [CALCITE-3353]
ProjectJoinTransposeRulecaused AssertionError when creating a new Join (Wenhui Tang) - [CALCITE-3539]
EnumerableDefaults#nestedLoopJoinreturns duplicates for JoinType.SEMI - [CALCITE-3521]
CalciteSystemPropertyfailed to load config file - [CALCITE-3512] Query fails when comparing Time/TimeStamp types (DonnyZone)
- [CALCITE-3534] Support parse(unparse) alien system non-standard data type
- [CALCITE-3454] Support
Exchange,SetOpandTableModifyfor builtin metadata query (xy2953396112) - [CALCITE-3527] Enrich tests for SQL hints in
SqlHintsConverterTest(Shuo Cheng) - [CALCITE-3245]
CompileExceptionin Janino when a query contains a division between aDoubleand aBigDecimal(DonnyZone) - [CALCITE-3492]
RexUtil.simplifyOrs()throws exception if terms has 1 RexNode - [CALCITE-3519] Use List instead of
BitSetto keep inheritPath in RelHint (Shuo Cheng) - [CALCITE-3491] Remove unused method
VolcanoPlanner.completeConversion()(Xiening Dai) - [CALCITE-3498] Unnest operation’s ordinality should be deterministic (DonnyZone)
- [CALCITE-3494] Support decimal type aggregate in Interpreter (Wang Yanlin)
- [CALCITE-3503] NPE at
VolcanoPlanner#isValidwhen DEBUG is enabled (Xiening Dai) - [CALCITE-3448]
AggregateOnCalcToAggUnifyRulemay ignore Project incorrectly (Jin Xing) - [CALCITE-3476]
ParameterScopeshould override resolveColumn interface (Jark Wu) - [CALCITE-3474] NullPointerException in
SqlSimpleParsertoke.s.equals() (Xiucheng Qu) - [CALCITE-3469] Wrong rel used in
SubstitutionVisitor#rowTypesAreEquivalent(Min Dai) - [CALCITE-3487] Should not hard code
RelMetadataQueryclass in VolcanoPlanner.isValid() (Xiening Dai) - [CALCITE-3482] Equality of nested
ROWs returns false for identical literal value - [CALCITE-3479] Stack overflow error thrown when running join query (Xiening Dai)
- [CALCITE-3435] Enable decimal modulus operation to allow numeric with non-zero scale (DonnyZone)
- [CALCITE-3456] AssertionError throws for aggregation with same digest
INsubqueries in same scope - [CALCITE-3408] Add support for enumerable intersect/minus all (Wang Yanlin)
- [CALCITE-3423] Support using
CASToperation andBOOLEANtype value in table macro (Wang Yanlin) - [CALCITE-3458] Remove desc in
AbstractRelNode - [CALCITE-3400] Implement left/right/semi/anti/full join in interpreter (Wang Yanlin)
- [CALCITE-3254] Exception while deserializing with interval type or with empty partition/order key for
RexOver(Wang Yanlin) - [CALCITE-3457]
RexSimplifyincorrectly simplifiesIS NOT NULLoperator withITEMcall - [CALCITE-3433]
EQUALSoperator between date/timestamp types returns false if the type is nullable (DonnyZone) - [CALCITE-3449] Sync the table name logic from
TableScaninto theTableModify(dy.Zhuang) - [CALCITE-3376]
VolcanoPlannerCannotPlanException: best rel is null even though there is an option with non-infinite cost Problem solved via CALCITE-2018, just add a unit test for this specific scenario - [CALCITE-3454] Support
ExchangeinRelMdMaxRowCount,RelMdMinRowCount,RelMdRowCount(xy2953396112) - [CALCITE-2018] Queries failed with AssertionError: rel has lower cost than best cost of subset
- [CALCITE-3446] Make
RelMetadataQueryextensible - [CALCITE-3390] Add
ITEMexpression toSqlKindand include it in the policy map for Strong (Aman Sinha) - [CALCITE-3334] Refinement for Substitution-Based MV Matching (Jin Xing)
- [CALCITE-3439] Support
IntersectandMinusinRelMdPredicates(Jin Xing) - [CALCITE-3451] Support
TableModifyinRelMdNodeTypes(xy2953396113) - [CALCITE-3444] Upgrade SQLLine to 1.9.0, and solve “Class path contains multiple SLF4J bindings” problem
- [CALCITE-3436] In
CalciteConnectionConfigImpl, add isSet and unset methods (Ryan Fu) - [CALCITE-3440]
RelToSqlConverterdoes not properly alias ambiguousORDER BY - [CALCITE-3441] Remove
SqlTypeExplicitPrecedenceList.COMPACT_NUMERIC_TYPESbecause the NULL delimiters are useless - [CALCITE-3428] Refine
RelMdColumnUniquenessforFilterby considering constant columns (Jin Xing) - Add
RelBuilder.fields(ImmutableBitSet) - [CALCITE-3424] AssertionError thrown for user-defined table function with array argument (Igor Guzenko)
- [CALCITE-3414] In calcite-core, use RexToLixTranslator.convert for type conversion code generation uniformly (DonnyZone)
- [CALCITE-3416] SQL Dialects DEFAULTs should be more extensible
- [CALCITE-3393]
RelStructuredTypeFlattener: improve support for functions with struct input (Igor Guzenko) - [CALCITE-3318] Preserving
CASTofSTRINGoperand in binary comparison for BigQuery (soma-mondal) - [CALCITE-2792] Stackoverflow while evaluating filter with large number of OR conditions
- [CALCITE-3407] Implement
MINUSandINTERSECTin interpreter (Wang Yanlin) - [CALCITE-3420]
NullPointerExceptionthrows for implicit type coercion of nestedSEToperations - [CALCITE-3403]
RelMetadataQueryreuse (Jin Xing) - [CALCITE-3411] Incorrect code generated for BigDecimal ConstantExpression (DonnyZone)
- [CALCITE-3410] Simplify
RelOptRulesTestandHepPlannerTestby making test methods fluent - [CALCITE-3404] In
AggregateExpandDistinctAggregatesRule, treat all the agg expressions as distinct if they have the same arguments and the non-distinct expressions distinct constraints can be ignored - [CALCITE-3382] Hard-wire the
TUMBLEgrouping function into SQL parser (Rui Wang) - [CALCITE-3396] Materialized view matches unexpectedly for
UNIONwith different ‘all’ property (Jin Xing) - [CALCITE-3379] Support expand
STRINGcolumn expression of table during sql-to-rel conversion - [CALCITE-3397] AssertionError for interpretering multiset value (Wang Yanlin)
- [CALCITE-3383] Plural time units
- Re-format and re-organize config.fmpp files that customize the SQL parser
- [CALCITE-3392] Column expression in DDL should be validated before converting to RexNode
- [CALCITE-3330] Use breadth first approach for propagating cost improvements
- [CALCITE-3386] CyclicMetadataException singleton instance causes confusion when debugging (Zuozhi Wang)
- [CALCITE-3389] Test may fail if HashSet iterates in different order (contextshuffling)
- [CALCITE-3361] Add ‘lenientOperatorLookup’ connection property
- [CALCITE-3347] IndexOutOfBoundsException in
FixNullabilityShuttlewhen usingFilterIntoJoinRule(Wang Yanlin, Shuming Li) - [CALCITE-3374] Error format check result for explain plan as json (Wang Yanlin)
- [CALCITE-3363]
JoinUnionTransposeRule.RIGHT_UNIONshould not matchSEMI/ANTIJoin (Jin Xing) - [CALCITE-3369] In
LatticeSuggester, recommend lattices based onUNIONqueries - [CALCITE-3365] Don’t require use of
JdbcSchemainQuerySqlStatisticProvider(Lindsey Meyer) - [CALCITE-3239]
Calc#accept(RexShuttle shuttle)does not update rowType. (Jin Xing) - [CALCITE-3288] In
ConstantExpressionsupportSETliterals (xy2953396112) - [CALCITE-1178] Allow
SqlBetweenOperatorto compareDATEandTIMESTAMP - [CALCITE-3348] AssertionError while determining distribution of Calc (Wang Yanlin)
- [CALCITE-3287]
UnioninRelMdRowCount.javadoesn’t take into account ‘union all’ (Hong Shen) - [CALCITE-3357]
Trivialnull checking inRelSet#addAbstractConverters(Jin Xing) - [CALCITE-3286] In
LatticeSuggester, allow join conditions that use expressions - [CALCITE-3360]
SqlValidatorthrows NPE for unregistered function without implicit type coercion - [CALCITE-3316] Exception while deserializing
LogicalCorrelatefrom json string (Wang Yanlin) - [CALCITE-3317] Add a public constructor for
LogicalCalcwith RelInput type parameter (Wang Yanlin) - [CALCITE-3319] AssertionError when reducing decimals (Wang Yanlin)
- [CALCITE-3331] Support implicit type cast for operators that use single operand family checker
Adapters
- [CALCITE-3751] JDBC adapter generates SQL with wrong aliases in
GROUP BY…ORDER BYquery - [CALCITE-3593] JDBC adapter generates incorrect
HAVINGclause for BigQuery (Jin Xing) - [CALCITE-3466] JDBC adapter incorrectly drops
GROUP BYclause of sub-query (Wang Weidong) - [CALCITE-3154]
RelToSqlConvertergeneratesNULLS LASTandNULLS FIRSTwrongly when usingMysqlSqlDialectto convertRexOverto sql (Wenhui Tang) - [CALCITE-2672] Qualifying the common column should not be allowed in Oracle dialect and SQL standard
- [CALCITE-3568] BigQuery, Hive, Spark SQL dialects do not support nested aggregates (Divyanshu Srivastava)
- [CALCITE-3381] In JDBC adapter, when using BigQuery dialect, converts SQL types to BigQuery types correctly(Rui Wang)
- [CALCITE-3381] Unparse to correct BigQuery integral syntax:
INTERVALint64 time_unit. Range time unit is not supported yet by BigQuery (amaliujia) - [CALCITE-3486] In JDBC adapter, when generating
ROWvalue expression, generates theROWkeyword only if the dialect allows it (quxiucheng) - Use proper ClassLoader in SparkHandlerImpl
- [CALCITE-3381] When using BigQuery dialect, Rel2SQL converter converts SQL types to BigQuery types (part2) (Rui Wang)
- [CALCITE-3475] JDBC adapter generates invalid SQL for
UNION ALLon BigQuery (Steven Talbot) - [CALCITE-3370] In JDBC adapter for Microsoft SQL Server, emulate
NULLS FIRSTusingCASEexpression (Justin Swett) - [CALCITE-3344] In JDBC adapter, generate
SELECT TOP(n)for MSSQL 2008 and earlier, and forSybaseASE - [CALCITE-3300] In JDBC adapter, when generating SQL for count star, generates the star argument of the call (Wang Weidong)
- [CALCITE-3247] In JDBC adapter, when generating SQL for Hive, transform
SUBSTRINGfunction to correct format (Jacky Woo) - [CALCITE-3282] In JDBC adapter, when generating SQL for Hive, generate
INTEGERtype asINT(huangfeng) - [CALCITE-3335] In ElasticSearch adapter, introduce configuration parameter “hosts” which deprecates previous “coordinates” (Shikha Somani)
Build and test suite
- Stop building zip archives when building using gradle
- [CALCITE-2442] Remove .toDelete cassandra temp folder on Windows after tests
- Update Gradle test output formatting
- Color test results in Gradle output
- In JDBC adapter tests that check generated SQL, extract SQL from string literals in generated Java
- Refactor MaterializationTest to use a fluent API
- Allow
CREATE TABLE ... AS SELECT ...in Quidem tests - Increase test coverage for regular CI jobs: move @Tag(slow) annotations to test methods
- Use concurrent test execution by default
- Add gradle task ‘aggregateJavadocIncludingTests’ that builds javadoc for both main and test
- [CALCITE-3654] Use single Elasticsearch instance for all elasticsearch tests
- [CALCITE-3637] Update linq4j tests upgrade from junit4 to junit5 (Qianjin Xu)
- [CALCITE-3623] Replace Spotless with Autostyle
- [CALCITE-3622] Update geode tests upgrade from junit4 to junit5 (Qianjin Xu)
- [CALCITE-3601] Update elasticsearch tests upgrade from junit4 to junit5 (Qianjin Xu)
- [CALCITE-3625] Update mongo tests upgrade from junit4 to junit5 (Qianjin Xu)
- Move PGP signing to com.github.vlsi.stage-vote-release Gradle plugin
- [CALCITE-3595] Test infrastructure overwrites reference log with wrong results (Wang Yanlin)
- [CALCITE-3559] Drop
HydromaticFileSetCheck, upgrade Checkstyle 7.8.2 → 8.27 - [CALCITE-3540] FoodmartTest produces many warnings due to incorrect use of CalciteAssert.pooled()
- [CALCITE-3548] unlock ./gradlew :ubenchmark:jmh to run benchmarks
- [CALCITE-3327] Simplify
SqlValidatorTestandSqlParserTestby making test methods fluent - [CALCITE-2905] Migrate build scripts to Gradle
- [CALCITE-2457] JUnit 4 → 5: trivial renames
- [CALCITE-2457] Configure build to automatically replace common JUnit4 classes with JUnit5
- Build script: instantiate sqllineClasspath only when buildSqllineClasspath is used
- GitHub Actions: actions/checkout@master → v1.1.0 to avoid unexpected failures
- [CALCITE-3141] Slow tests are not run in continuous integration
- [CALCITE-3140] Multiple failures when executing slow tests
- Reduce FoodmartQuery heap consumption by ignoring rows/columns as they are never used in tests
- Add ‘./gradlew style’ task to apply code format and report violations
- [CALCITE-2905] Migrate build scripts to Gradle
- [CALCITE-2905] Add hydromatic-resource as plain source file
- [CALCITE-3457] Ignore fuzzer tests due to known unsolved issue
- Improve folder detection logic in DocumentationTest
- Ignore
TpcdsLatticeSuggesterTestbecause it does not work - Use
Class#getResourcein FileReaderTest instead of hard-coding file name - Simplify
RexProgramTest#reproducerFor3457test - Add shrinker for
RexProgramFuzzyso the results are simpler to reason about - Refactor
SqlPrettyWriterTest, using a fluent API for invoking tests - [CALCITE-3362] Add some tests for empty Lattice (Wang Yanlin)
- [CALCITE-3421] Reuse
RelMetadataQueryin test suites
Dependency version upgrade
- [CALCITE-3818] Upgrade Avatica version to 1.16.0
- Update Gradle: 6.1 → 6.1.1
- [CALCITE-3742] Update Gradle: 6.0.1 → 6.1
- Bump spark-core_2.10 from 2.2.0 to 2.2.2
- [CALCITE-3516] Bump net.java.dev.jna:jna to 5.5.0
- [CALCITE-2457] Druid: JUnit4 → JUnit5
- Bump geode-core from 1.9.2 to 1.10.0
- [CALCITE-3502] Upgrade Geode dependency 1.6.0 → 1.9.2
- Bump jackson-databind from 2.9.9.3 to 2.9.10.1
Web site and documentation
- Site: Update IntelliJ instructions with suggested and problematic versions
- Site: Switch PMC Chair to Stamatis Zampetakis
- Site: Add two links with useful information about Gradle (Rui Wang)
- Site: Update homepage of Stamatis Zampetakis
- Site: Move “Fast federated SQL with Apache Calcite” in talks section and add video link
- Site: Add Haisheng Yuan as PMC
- Site: Append ‘(FirstName LastName)’ to commit message example in contributing section
- Site: Add Danny Chan as PMC
- [CALCITE-3445] In web site, automatically redirect http to https
- [CALCITE-3391] Insecure pages warning on Chrome
- Site: Update upcoming talks section for ApacheCon Europe 2019
- Site: Change GitHub avatar links to https
1.21.0 / 2019-09-11
This release comes two months after 1.20.0. It includes more than 100 resolved issues, comprising a large number of new features as well as general improvements and bug-fixes.
It is worth highlighting that Calcite now:
- supports implicit type coercion in various contexts (CALCITE-2302);
- allows transformations of Pig Latin scripts into algebraic plans (CALCITE-3122);
- provides an implementation for the main features of
MATCH_RECOGNIZEin theEnumerableconvention (CALCITE-1935); - supports correlated
ANY/SOME/ALLsub-queries (CALCITE-3031); - introduces anonymous types based on
ROW,ARRAY, and nested collection (CALCITE-3233, CALCITE-3231, CALCITE-3250); - brings new join algorithms for the
Enumerableconvention (CALCITE-2979, CALCITE-2973, CALCITE-3284).
Compatibility: This release is tested
on Linux, macOS, Microsoft Windows;
using Oracle JDK 8, 9, 10, 11, 12, 13 and OpenJDK 8, 9, 10, 11, 12, 13;
Guava versions 19.0 to 27.1-jre;
Apache Druid version 0.14.0-incubating;
other software versions as specified in pom.xml.
Breaking Changes
- Core parser config.fmpp#dataTypeParserMethods should return
SqlTypeNameSpecinstead ofSqlIdentifier. - The description of converter rules has slightly changed
(CALCITE-3115).
In some rare cases this may lead to a
Rule description ... is not validexception. The exception can easily disappear by changing the name of theConventionwhich causes the problem.
New features
- [CALCITE-2973] [CALCITE-3284] Allow joins (hash, semi, anti) that have equi conditions to be executed using a hash join algorithm (Lai Zhou)
- [CALCITE-2302] Implicit type cast support
- [CALCITE-3122] Convert Pig Latin scripts into Calcite relational algebra and Calcite SQL (Khai Tran)
- [CALCITE-2979] Add a block-based nested loop join algorithm (Khawla Mouhoubi)
- [CALCITE-3263]
Add
MD5,SHA1SQL functions (Shuming Li) - [CALCITE-3204]
Implement
jpscommand for OS adapter (Qianjin Xu) - [CALCITE-3260] Add Expressions.evaluate(Node), a public API for evaluating linq4j expressions (Wang Yanlin)
- [CALCITE-3280]
Add
REGEXP_REPLACEfunction in Oracle, MySQL libraries (Shuming Li) - [CALCITE-3111]
Add
RelBuilder.correlatemethod, and allow custom implementations ofCorrelateinRelDecorrelator(Juhwan Kim) - [CALCITE-3252]
Add
CONVERT_TIMEZONE,TO_DATEandTO_TIMESTAMPnon-standard SQL functions (Lindsey Meyer) - [CALCITE-3235]
Add
CONCATfunction for Redshift (Ryan Fu) - [CALCITE-3250]
Support nested collection type for
SqlDataTypeSpec - [CALCITE-1935]
Implement
MATCH_RECOGNIZE(Julian Feinauer, Zhiqiang-He) - [CALCITE-2843]
Support Postgres cast operator (
::) (Muhammad Gelbana) - [CALCITE-3233]
Support
ROWtype forSqlDataTypeSpec - [CALCITE-3231]
Support
ARRAYtype forSqlDataTypeSpec - [CALCITE-2624] Add a rule to copy a sort below a join operator (Khawla Mouhoubi)
- [CALCITE-3031]
Support for correlated
ANY/SOME/ALLsub-query (Vineet Garg) - [CALCITE-2510]
Implement
CHRfunction (Sergey Tsvetkov, Chunwei Lei) - [CALCITE-3176] File adapter for parsing JSON files
- [CALCITE-3144]
Add rule,
AggregateCaseToFilterRule, that convertsSUM(CASE WHEN b THEN x END)toSUM(x) FILTER (WHERE b) - [CALCITE-2995]
Implement
DAYNAME,MONTHNAMEfunctions; addlocaleconnection property (xuqianjin) - [CALCITE-2460]
[CALCITE-2459] Add
TO_BASE64,FROM_BASE64SQL functions (Wenhui Tang) - [CALCITE-3063] Parse and process Postgres posix regular expressions
Bug-fixes, API changes and minor enhancements
- [CALCITE-3321] Set casing rules for BigQuery SQL dialect (Lindsey Meyer)
- [CALCITE-3115]
Cannot add
JdbcRuleinstances that have differentJdbcConventionto sameVolcanoPlanner’sRuleSet(Wenhui Tang, Igor Guzenko) - [CALCITE-3309]
Refactor
generatePredicatemethod fromEnumerableNestedLoopJoin,EnumerableHashJoin, andEnumerableBatchNestedLoopJoininto a single location - [CALCITE-3310] Approximate and exact aggregate calls are recognized as the same during SQL-to-RelNode conversion
- [CALCITE-3292]
SqlToRelConverter#substituteSubQuery fails with NullPointerException when
converting
SqlUpdate(Jin Xing) - [CALCITE-3297]
PigToSqlAggregateRuleshould be applied on multi-set projection to produce an optimal plan (Igor Guzenko) - [CALCITE-3295]
Add aggregate call name in serialized json string for
RelNode(Wang Yanlin) - [CALCITE-3296]
Decorrelator shouldn’t give empty value when fetch and offset values are null
in
Sortrel (Juhwan Kim) - [CALCITE-3283]
RelSubsetdoes not contain its bestRelNode(Xiening Dai) - [CALCITE-3210]
JDBC adapter should generate
CAST(NULL AS type)rather thanNULLconditionally (Wang Weidong) - [CALCITE-3220]
JDBC adapter now transforms
TRIMtoTRIM,LTRIMorRTRIMwhen target is Hive (Jacky Woo) - [CALCITE-3228]
Error while applying rule
ProjectScanRule: interpreter - [CALCITE-3223]
Materialized view fails to match when there is non-
RexInputRefin the projects (Jin Xing) - [CALCITE-3257]
RelMetadataQuerycache is not invalidated when log trace is enabled (Xiening Dai) - [CALCITE-3138]
RelStructuredTypeFlattenerdoesn’t restructureROWtype fields (Igor Guzenko) - [CALCITE-3251]
BinaryExpressionevaluate method support full numeric types inPrimitive(xy2953396112) - [CALCITE-3259]
Align ‘Property’ in the serialized XML string of
RelXmlWriter(Wang Yanlin) - [CALCITE-3167]
Make
equalsandhashCodemethods final inAbstractRelNode, and remove overriding methods inEnumerableTableScan(Jin Xing) - [CALCITE-3089]
Deprecate
EquiJoin - [CALCITE-3267]
Remove method
SqlDataTypeSpec#deriveType(RelDataTypefactory) - [CALCITE-3214]
Add
UnionToUnionRulefor materialization matching (refine rule name) (Jin Xing) - [CALCITE-3214]
Add
UnionToUnionRulefor materialization matching (Jin Xing) - [CALCITE-3249] `Substitution#getRexShuttle does not consider RexLiteral (Jin Xing)
- [CALCITE-3229]
UnsupportedOperationExceptionforUPDATEwithINquery - [CALCITE-3236] Handle issues found in static code analysis (DonnyZone)
- [CALCITE-3238]
Support Time Zone suffix of DateTime types for
SqlDataTypeSpec - [CALCITE-3159]
Remove
DISTINCTflag from calls toMIN,MAX,BIT_OR,BIT_ANDaggregate functions (xuqianjin) - [CALCITE-3237]
IndexOutOfBoundsExceptionwhen generating deeply nested Java code from linq4j (Sahith Nallapareddy) - [CALCITE-3234] For boolean properties, empty string should mean “true”
- [CALCITE-3226]
RelBuilderdoesn’t keep the alias whenscanfrom an expanded view (Jin Xing) - [CALCITE-3198]
Enhance
RexSimplifyto handle(x <> a or x <> b) - [CALCITE-3101]
Don’t push non-equi join conditions into
ProjectbelowJoin - [CALCITE-3227]
IndexOutOfBoundsExceptionwhen checking candidate parent match’s input ordinal inVolcanoRuleCall - [CALCITE-3177] Ensure correct deserialization of relational algebra
- [CALCITE-3218]
Syntax error while parsing
DATEADDfunction (which is valid on Redshift) (Lindsey Meyer) - Deprecate
RexBuilder.constantNull(), because it produces untypedNULLliterals that make planning difficult - [CALCITE-3191]
In JDBC adapter for MySQL, implement
Valuesby generatingSELECTwithoutFROM - [CALCITE-3147] In JDBC adapter, accommodate the idiosyncrasies of how BigQuery (standard SQL) quotes character literals and identifiers
- [CALCITE-3131]
In
LatticeSuggester, record whether columns are used as “dimensions” or “measures” - [CALCITE-3175]
AssertionErrorwhile serializing to JSON aRexLiteralwithEnumtype (Wang Yanlin) - [CALCITE-3225]
JoinToMultiJoinRuleshould not match semi- or anti-LogicalJoin - [CALCITE-3215]
Simplification may have not fully simplified IS
NOT NULLexpressions - [CALCITE-3192] Simplification may weaken OR conditions containing inequalities
- [CALCITE-3211]
List of
MutableRelmay fail to be identified bySubstitutionVisitorduring matching (Jin Xing) - [CALCITE-3207]
Fail to convert
JoinwithLIKEcondition to SQL statement (wojustme) - [CALCITE-2496]
Return 0 in case of
EXTRACT(MILLI/MICRO/NANOSECOND FROM date)(Sergey Nuyanzin, Chunwei Lei) - [CALCITE-3109]
Improvements on algebraic operators to express recursive queries (
RepeatUnionandTableSpool) - [CALCITE-3209]
When calling
MutableMultiRel.setInput, exception thrown (Jin Xing) - [CALCITE-3195] Handle a UDF that throws checked exceptions in the Enumerable code generator (DonnyZone)
- [CALCITE-3118]
VolcanoRuleCallshould look atRelSubsetrather thanRelSetwhen checking child ordinal of a parent operand (Botong Huang) - [CALCITE-3201]
SqlValidatorthrows exception for SQL insert target table with virtual columns - [CALCITE-3182] Trim unused fields for plan of materialized-view before matching (Jin Xing)
- [CALCITE-3174]
IS NOT DISTINCT FROMcondition pushed fromFiltertoJoinis not collapsed (Bohdan Kazydub) - [CALCITE-3166]
Make
RelBuilderconfigurable - [CALCITE-3113]
Equivalent
MutableAggregates with different row types should match with each other (Jin Xing) - CALCITE-3187: Make decimal type inference overridable (Praveen Kumar)
- [CALCITE-3145]
RelBuilder.aggregatethrowsIndexOutOfBoundsExceptionifgroupKeyis non-empty and there are duplicate aggregate functions - Change type of
SqlStdOperatorTable.GROUPINGfield to public class - [CALCITE-3196]
In
Frameworks, addinterface BasePrepareAction(a functional interface) and deprecateabstract class PrepareAction - [CALCITE-3183]
During field trimming,
Filteris copied with wrong traitSet (Juhwan Kim) - [CALCITE-3189] Multiple fixes for Oracle SQL dialect
- [CALCITE-3165]
Project#accept(RexShuttleshuttle) does not update rowType - [CALCITE-3188]
IndexOutOfBoundsExceptioninProjectFilterTransposeRulewhen executingSELECT COUNT - [CALCITE-3160] Failed to materialize when the aggregate function uses group key (DonnyZone)
- [CALCITE-3170] ANTI join on conditions push down generates wrong plan
- [CALCITE-3169]
decorrelateRel method should return when meeting
SEMI/ANTIjoin inRelDecorrelator - [CALCITE-3171]
SemiJoinon conditions push down throwsIndexOutOfBoundsException - [CALCITE-3172]
RelBuilder#emptydoes not keep aliases - [CALCITE-3121]
VolcanoPlannerhangs due to sub-query with dynamic star - [CALCITE-3152] Unify throws in SQL parser
- [CALCITE-3125]
Remove completely
class CorrelateJoinType - [CALCITE-3133]
Remove completely
class SemiJoinType - [CALCITE-3126]
Remove deprecated
SemiJoinusage completely - [CALCITE-3146]
Support the detection of nested aggregations for
JdbcAggregateinSqlImplementor(Wenhui Tang) - [CALCITE-3155]
Empty
LogicalValuescan not be converted toUNION ALLwithout operands which can not be unparsed (Musbah EL FIL) - [CALCITE-3151] RexCall’s Monotonicity is not considered in determining a Calc’s collation
- [CALCITE-2801]
Check input type in
AggregateUnionAggregateRulewhen remove the bottomAggregate(Hequn Cheng) - [CALCITE-3149]
RelDataTypeCACHE inRelDataTypeFactoryImplcan’t be garbage collected - [CALCITE-3060]
MutableProjectshould be generated based on INVERSE_SURJECTION mapping (DonnyZone) - [CALCITE-3148]
Validator throws
IndexOutOfBoundsExceptionforSqlInsertwhen source and sink have non-equal number of fields
Build and test suite
- [CALCITE-3322]
Remove duplicate test case in
RelMetadataTest - [CALCITE-3314] CVSS dependency-check-maven fails for calcite-pig, calcite-piglet, calcite-spark
- [CALCITE-3315] Multiple failures in Druid IT tests due to implicit casts
- [CALCITE-3307]
PigRelExTest,PigRelOpTestandPigScriptTestfail on Windows - In
SqlFunctionsTest, replaceassertEqualsandassertNullwithassertThat - [CALCITE-3258] Upgrade jackson-databind from 2.9.9 to 2.9.9.3, and kafka-clients from 2.0.0 to 2.1.1
- [CALCITE-3222] Fix code style issues introduced by [CALCITE-3031] (Vineet Garg)
- More compiler fixes, and cosmetic changes
- Fix compiler warnings
- Update stale tests in DruidAdapter
- Following
[CALCITE-2804],
fix incorrect expected Druid query in test case
DruidAdapterIT#testCastToTimestamp(Justin Szeluga) - [CALCITE-3153]
Improve testing in
TpcdsTestusingassertEqualinstead of printing results - Fix javadoc error
- Fix compilation warnings after Mongo java driver upgrade
- [CALCITE-3179] Bump Jackson from 2.9.8 to 2.9.9 (Fokko Driesprong)
- [CALCITE-3157] Mongo java driver upgrade: 3.5.0 → 3.10.2
- [CALCITE-3156] Mongo adapter. Replace fongo with Mongo Java Server for tests
- [CALCITE-3168] Add test for invalid literal of SQL parser
Web site and documentation
- [CALCITE-3303] Release Calcite 1.21.0
- [CALCITE-3311] Add doc to site for implicit type coercion
- [CALCITE-3262]
Refine doc of
SubstitutionVisitor(Jin Xing) - [CALCITE-2835] Markdown errors on the Geode adapter page
- Site: Update Apache links on homepage to HTTPS
- Update favicon for new logo
- [CALCITE-3136]
Fix the default rule description of
ConverterRule(TANG Wen-hui) - [CALCITE-3184] Add the new logo to the website
- Update example announcement
- Add committer names to 1.20.0 release notes
- Add 1.20.0 release date
- Add 1.20.0 release announcement
1.20.0 / 2019-06-24
This release comes three months after 1.19.0. It includes a large number of bug fixes, and additional SQL functions. There is now also explicit support for anti-joins. Several new operators have been added to the algebra to allow support for recursive queries. An adapter has also been added for Apache Kafka.
Compatibility: This release is tested
on Linux, macOS, Microsoft Windows;
using Oracle JDK 8, 9, 10, 11, 12, 13 and OpenJDK 8, 9, 10, 11, 12, 13;
Guava versions 19.0 to 27.1-jre;
Apache Druid version 0.14.0-incubating;
other software versions as specified in pom.xml.
Breaking Changes
- Make
EnumerableMergeJoinextendJoininstead ofEquiJoin -
CorrelateuseJoinRelTypeinstead ofSemiJoinType - Rename
EnumerableThetaJointoEnumerableNestedLoopJoin - Rename
EnumerableJointoEnumerableHashJoin - Remove
SemiJoinFactoryfromRelBuilder, methodsemiJoinnow returns aLogicalJoinwith join typeJoinRelType.SEMIinstead of aSemiJoin - Rules:
SemiJoinFilterTransposeRule,SemiJoinJoinTransposeRule,SemiJoinProjectTransposeRuleandSemiJoinRemoveRulematchLogicalJoinwith join typeSEMIinstead ofSemiJoin. -
SemiJoin,EnumerableSemiJoin,SemiJoinTypeandCorrelateJoinType, and methods that use them, are deprecated for quick removal in 1.21 - The Elasticsearch adapter no longer supports Elasticsearch types. Calcite table names will reflect index names in Elasticsearch (as opposed to types). We recommend use of Elasticsearch 6.2 (or later) with Calcite.
New features
- [CALCITE-2822] Allow
MultiJoinrules with any project/filter (Siddharth Teotia) - [CALCITE-2968] New
AntiJoinrelational expression - [CALCITE-2721] Support parsing record-type [DOT] member-functions
- [CALCITE-3005] Implement string functions:
LEFT,RIGHT(xuqianjin) - [CALCITE-2812] Add algebraic operators to allow expressing recursive queries
- [CALCITE-2913] Adapter for Apache Kafka (Mingmin Xu)
- [CALCITE-3084] Implement JDBC string functions:
ASCII,REPEAT,SPACE,SOUNDEX,DIFFERENC(pingle wang) - [CALCITE-2985] Implement
JSON_STORAGE_SIZEfunction (xuqianjin) - [CALCITE-2601] Add
REVERSEfunction (pingle wang) - [CALCITE-2712] Add rule to remove null-generating side of a Join
- [CALCITE-2965] Implement string functions:
REPEAT,SPACE,SOUNDEX,DIFFERENCE - [CALCITE-2975] Implement
JSON_REMOVEfunction (xuqianjin) - [CALCITE-2933] Add timestamp extract for casts from timestamp type to other types
- [CALCITE-3011] Support left and right outer joins with
AggregateJoinTransposeRule(Vineet Garg) - [CALCITE-2427] Allow sub-queries in DML statements (Pressenna Sockalingasamy)
- [CALCITE-2914] Add a new statistic provider, to improve how
LatticeSuggesterdeduces foreign keys - [CALCITE-2754] Implement
LISTAGGfunction (Sergey Nuyanzin, Chunwei Lei) - [CALCITE-1172] Add rule to flatten two Aggregate operators into one
- [CALCITE-2892] Add the
JSON_KEYSfunction (xuqianjin) - [CALCITE-883] Support
RESPECT NULLS,IGNORE NULLSoption forLEAD,LAG,FIRST_VALUE,LAST_VALUE,NTH_VALUEfunctions (Chunwei Lei) - [CALCITE-2920] In
RelBuilder, addantiJoinmethod (Ruben Quesada Lopez) - [CALCITE-1515] In
RelBuilder, addfunctionScanmethod to createTableFunctionScan(Chunwei Lei) - [CALCITE-2658] Add
ExchangeRemoveConstantKeysRulethat removes constant keys fromExchangeorSortExchange(Chunwei Lei) - [CALCITE-2729] Introducing
WindowReduceExpressionsRule(Chunwei Lei) - [CALCITE-2808] Add the
JSON_LENGTHfunction (xuqianjin) - [CALCITE-589] Extend
unifyAggregatesmethod to work with Grouping Sets - [CALCITE-2908] Implement SQL
LAST_DAYfunction (Chunwei Lei)
Bug-fixes, API changes and minor enhancements
- [CALCITE-3119] Deprecate Linq4j
CorrelateJoinType(in favor ofJoinType) - [CALCITE-3087]
AggregateOnProjectToAggregateUnifyRuleignores Project incorrectly when its Mapping breaks ordering (DonnyZone) - [CALCITE-2744] Remove usage of deprecated API in
MockSqlOperatorTable - [CALCITE-3123] In
RelBuilder, eliminate duplicate aggregate calls - [CALCITE-3116] Upgrade to Avatica 1.15
- [CALCITE-2744]
RelDecorrelatoruse wrong output map forLogicalAggregatedecorrelate (godfreyhe and Danny Chan) - [CALCITE-2804] Fix casting to timestamps in Druid
- [CALCITE-3107] Upgrade commons-dbcp2 from 2.5.0 to 2.6.0 (Fokko Driesprong)
- [CALCITE-3106] Upgrade commons-pool2 from 2.6.0 to 2.6.2 (Fokko Driesprong)
- [CALCITE-2944] Deprecate Aggregate indicator and remove fields where possible
- [CALCITE-3098] Upgrade SQLLine to 1.8.0
- [CALCITE-2742] Read values of
USERandSYSTEM_USERvariables fromDataContext(Siddharth Teotia, Jacques Nadeau) - [CALCITE-3082] Fix NPE in
SqlUtil#getSelectListItem - [CALCITE-3093] Remove JDBC connection calls from
PlannerImpl - [CALCITE-3095] Add several system properties to control enabling/disabling of rules and traits
- [CALCITE-2696] Improve design of join-like relational expressions
- [CALCITE-3097] GROUPING SETS breaks on sets of size > 1 due to precedence issues (Steven Talbot)
- [CALCITE-3022] Babel: Various SQL parsing issues
- [CALCITE-3047] In JDBC adapter, expose multiple schemas of the back-end database
- [CALCITE-3048] Improve how JDBC adapter deduces current schema on Redshift
- Javadoc typos (Wenhui Tang, Muhammad Gelbana)
- [CALCITE-3096] In
RelBuilder, make alias method idempotent - [CALCITE-3055] Use pair of
relNode’srowTypeand digest as unique key for cache inRelOptPlanner(KazydubB) - [CALCITE-3077] Rewrite
CUBE&ROLLUPqueries inSparkSqlDialect(DonnyZone) - [CALCITE-3090] Remove Central configuration
- [CALCITE-2807] Fix
IS NOT DISTINCT FROMexpression identification inRelOptUtil#pushDownJoinConditions() - [CALCITE-3050] Integrate
SqlDialectandSqlParser.Config - [CALCITE-3023] Upgrade elastic search to 7.x (Takako Shimamoto)
- [CALCITE-3067] Splunk adapter cannot parse right session keys from Splunk 7.2 (Shawn Chen)
- [CALCITE-3076]
AggregateJoinTransposeRulethrows error for unique under aggregate keys when generating merged calls - [CALCITE-3068]
testSubprogram()does not test whether subprogram gets re-executed - [CALCITE-3072] Generate right SQL for
FLOOR&SUBSTRINGfunctions inSparkSqlDialect(DonnyZone) - [CALCITE-3074] Move MySQL’s JSON operators to
SqlLibraryOperators - [CALCITE-3062] Do not populate
provenanceMapif not debug - [CALCITE-2282] Remove sql operator table from parser
- [CALCITE-3052] Error while applying rule
MaterializedViewAggregateRule(Project-Aggregate):ArrayIndexOutOfBoundsException - [CALCITE-3066]
RelToSqlConvertermay incorrectly throw anAssertionErrorfor some decimal literals - [CALCITE-3028] Support FULL OUTER JOIN with
AggregateJoinTransposeRule(Vineet Garg) - [CALCITE-3017] Improve null handling of
JsonValueExpressionOperator - [CALCITE-2936] Simplify EXISTS or NOT EXISTS sub-query that has “GROUP BY ()”
- [CALCITE-2803]
ProjectTransposeJoinRulemesses INDF expressions - [CALCITE-3061] Query with WITH clause fails when alias is the same as the table with rolled up column
- [CALCITE-3017] Re-organize how we represent built-in operators that are not in the standard operator table
- [CALCITE-3056] Elasticsearch adapter. Invalid result with cast function on raw queries
- [CALCITE-3046]
CompileExceptionwhen inserting casted value of composited user defined type into table - [CALCITE-3054] Elasticsearch adapter. Avoid scripting for simple projections
- [CALCITE-3039] In Interpreter, min() incorrectly returns maximum double value (dijkspicy)
- [CALCITE-3049] When simplifying “IS NULL” and “IS NOT NULL”, simplify the operand first
- [CALCITE-3003]
AssertionErrorwhen GROUP BY nested field (Will Yu) - [CALCITE-3012] Column uniqueness metadata provider may return wrong result for
FULL OUTER JOINoperator (Vineet Garg) - [CALCITE-3045]
NullPointerExceptionwhen casting null literal to composite user defined type - [CALCITE-3030]
SqlParseExceptionwhen using component identifier for setting in merge statements (Danny Chan) - [CALCITE-3029] Java-oriented field type is wrongly forced to be NOT NULL after being converted to SQL-oriented
- [CALCITE-2292] Query result is wrong when table is implemented with
FilterableTableand the sql has multiple where conditions - [CALCITE-2998]
RexCopiershould support all rex types (Chunwei Lei, Alexander Shilov) - [CALCITE-2982]
SqlItemOperatorshould throw understandable exception message for incorrect operand type (pengzhiwei) - Revert “[CALCITE-3021]
ArrayEqualityComparershould useArrays#deepEquals/deepHashCodeinstead ofArrays#equals/hashCode(Ruben Quesada Lopez) - [CALCITE-3021]
ArrayEqualityComparershould useArrays#deepEquals/deepHashCodeinstead ofArrays#equals/hashCode - [CALCITE-2453] Parse list of SQL statements separated with a semicolon (Chunwei Lei, charbel yazbeck)
- [CALCITE-3004]
RexOveris incorrectly pushed down inProjectSetOpTransposeRuleandProjectCorrelateTransposeRule(Chunwei Lei) - [CALCITE-3001] Upgrade to Apache Druid 0.14.0-incubating
- Following [CALCITE-3010], remove redundant non-reserved keyword definitions
- [CALCITE-2993]
ParseExceptionmay be thrown for legal SQL queries due to incorrect “LOOKAHEAD(1)” hints - [CALCITE-3010] In SQL parser, move
JsonValueExpressioninto Expression - [CALCITE-3009]
DiffRepositoryshould ensure that XML resource file does not contain duplicate test names - [CALCITE-2986] Wrong results with
= ANYsub-query (Vineet Garg) - [CALCITE-2962]
RelStructuredTypeFlattenergenerates wrong types for nested column whenflattenProjection(Will Yu) - [CALCITE-3007] Type mismatch for
ANYsub-query in project (Vineet Garg) - [CALCITE-2865]
FilterProjectTransposeRulegenerates wrongtraitSetwhencopyFilter/Projectis true (Ruben Quesada Lopez) - [CALCITE-2343]
PushProjectorwith OVER expression causes infinite loop (Chunwei Lei) - [CALCITE-2994] Least restrictive type among structs does not consider nullability
- [CALCITE-2991]
getMaxRowCountshould return 1 for an Aggregate with constant keys (Vineet Garg) - [CALCITE-1338]
JoinProjectTransposeRuleshould not pull a literal up through the null-generating side of a join (Chunwei Lei) - [CALCITE-2977] Exception is not thrown when there are ambiguous field in select list
- [CALCITE-2739] NPE is thrown if the DEFINE statement contains IN in
MATCH_RECOGNIZE - [CALCITE-896] Remove Aggregate if grouping columns are unique and all functions are splittable
- [CALCITE-2456]
VolcanoRuleCalldoesn’t match unordered child operand when the operand is not the first operand.PruneEmptyRulesUNIONandMINUSwith empty inputs cause infinite cycle. (Zuozhi Wang) - [CALCITE-2847] Optimize global LOOKAHEAD for SQL parsers
- [CALCITE-2976] Improve materialized view rewriting coverage with disjunctive predicates
- [CALCITE-2954]
SubQueryJoinRemoveRuleandSubQueryProjectRemoveRulepassing on empty set instead of set of correlation id (Vineet Garg) - [CALCITE-2930]
IllegalStateExceptionwhenFilterCorrelateRulematches a SEMI or ANTI Correlate (Ruben Quesada Lopez) - [CALCITE-2004] Push join predicate down into inner relation for lateral join
- [CALCITE-2820] Avoid reducing certain aggregate functions when it is not necessary (Siddharth Teotia)
- [CALCITE-2928] When resolving user-defined functions (UDFs), use the case-sensitivity of the current connection (Danny Chan)
- [CALCITE-2900]
RelStructuredTypeFlattenergenerates wrong types on nested columns (Will Yu) - [CALCITE-2941]
EnumerableLimitRuleon Sort with no collation createsEnumerableLimitwith wrongtraitSetandcluster(Ruben Quesada Lopez) - [CALCITE-2909] Optimize Enumerable
SemiJoinwith lazy computation ofinnerLookup(Ruben Quesada Lopez) - [CALCITE-2903] Exception thrown when decorrelating query with
TEMPORAL TABLE - [CALCITE-2958] Upgrade SQLLine to 1.7.0
- [CALCITE-2796] JDBC adapter fix for
ROLLUPon MySQL 5 - In
RelFieldCollation, add awithXcopy method - [CALCITE-2953]
LatticeTest.testTileAlgorithm2andLatticeTest.testTileAlgorithm3fail intermittently - [CALCITE-574] Remove
org.apache.calcite.util.Bug.CALCITE_461_FIXED - [CALCITE-2951] Support decorrelating a sub-query that has aggregate with grouping sets (Haisheng Yuan)
- [CALCITE-2946]
RelBuilderwrongly skips creation of Aggregate that prunes columns if input produces one row at most - [CALCITE-2943] Materialized view rewriting logic calls
getApplicableMaterializationseach time the rule is triggered - [CALCITE-2942] Materialized view rewriting logic instantiates
RelMetadataQueryeach time the rule is triggered
Build and test suite
- Fix test exception caused by slightly different error message from regex in JDK 13
- Following [CALCITE-2812] Disable parallel execution of parameterized test to avoid hanging
- [CALCITE-35] More test cases to guard against providing a broken fix for parenthesized join (Muhammad Gelbana)
- [CALCITE-3034] CSV test case description does not match it’s code logic (FaxianZhao)
- Mongo adapter. Mongo checker validates only first line of the Bson query in tests
- [CALCITE-3053] Add a test to ensure that all functions are documented in the SQL reference
- [CALCITE-2961] Enable Travis to test against JDK 13
Web site and documentation
- [CALCITE-2952] Document JDK 12 support
- Site: Add Danny Chan as committer
- Site: Improve contribution guidelines for JIRA
- [CALCITE-2846] Document Oracle-specific functions, such as
NVLandLTRIM, in the SQL reference - Site: Add new committers and PMC (Chunwei Lei, Ruben Quesada Lopez, Zhiwei Peng and Stamatis Zampetakis)
- [CALCITE-3006] Example code on site cannot compile (Chunwei Lei)
- Site: Add guidelines for JIRA’s fix version field
- Site: Update content of “Not implemented” since JSON_LENGH has already been added
- Site: Improve documentation for MySQL-specific JSON operators
- [CALCITE-2927] The Javadoc and implement of
RuleQueue.computeImportance()is inconsistent (Meng Wang) - Update instructions for publishing site; we previously used subversion, now we use git
- Site: Add Alibaba MaxCompute to powered-by page
- Site: Add new committers (Haisheng Yuan, Hongze Zhang and Stamatis Zampetakis)
- [CALCITE-2952] Add JDK 12 as tested to 1.19.0 history
1.19.0 / 2019-03-25
This release comes three months after 1.18.0. It includes more than 80 resolved issues, comprising of a few new features as well as general improvements and bug-fixes. Among others, there have been significant improvements in JSON query support.
Compatibility: This release is tested
on Linux, macOS, Microsoft Windows;
using Oracle JDK 8, 9, 10, 11, 12 and OpenJDK 8, 9, 10, 11, 12;
Guava versions 19.0 to 27.1-jre;
Druid version 0.11.0;
other software versions as specified in pom.xml.
New features
- [CALCITE-1912]
Support
FOR SYSTEM_TIME AS OFin regular queries - [CALCITE-2786]
Add order by clause support for
JSON_ARRAYAGG - [CALCITE-2791]
Add the
JSON_TYPEfunction - [CALCITE-2864]
Add the
JSON_DEPTHfunction - [CALCITE-2881]
Add the
JSON_PRETTYfunction - [CALCITE-2770]
Add bitwise aggregate functions
BIT_AND,BIT_OR - [CALCITE-2799]
Allow alias in
HAVINGclause for aggregate functions
Bug-fixes, API changes and minor enhancements
- [CALCITE-1513]
Correlated
NOT INquery throwsAssertionError - [CALCITE-1726]
Sub-query in
FILTERis left untransformed - [CALCITE-2249]
AggregateJoinTransposeRulegenerates non-equivalent nodes ifAggregatecontains aDISTINCTaggregate function - [CALCITE-2288] Type assertion error when reducing partially-constant expression
- [CALCITE-2290] Type mismatch during flattening
- [CALCITE-2301] JDBC adapter: use query timeout from the top-level statement
- [CALCITE-2338] Make simplification API more conservative
- [CALCITE-2344]
Avoid inferring
$0 = nullpredicate from$0 IS NULLwhen$0is not nullable - [CALCITE-2375]
EnumerableDefaults.join_()leaks connections - [CALCITE-2437]
FilterMultiJoinMergeRuledoesn’t combine postFilterCondition - [CALCITE-2454]
Avoid treating
Project(x=1)andProject(x=1)equal when the type of1isintin the first rel andlongin the second - [CALCITE-2463]
Silence ERROR logs from
CalciteException,SqlValidatorException - [CALCITE-2464] Allow to set nullability for columns of structured types
- [CALCITE-2471]
RelNodedescription includes all tree when recomputed - [CALCITE-2554] Enrich enumerable join operators with order-preserving information
- [CALCITE-2582]
FilterProjectTransposeRuledoes not always simplify the new filter condition - [CALCITE-2599]
Support
ASCII(string)inSqlFunctions - [CALCITE-2621] Add rule to execute semi-joins with correlation
- [CALCITE-2623]
Add specific translation for
POSITION,MODand set operators in BigQuery and Hive SQL dialects - [CALCITE-2625]
ROW_NUMBER,RANKgenerating invalid SQL - [CALCITE-2629]
Unnecessary call to
CatalogReader#getAllSchemaObjectsinCatalogScope - [CALCITE-2635]
getMonotonocityis slow on wide tables - [CALCITE-2674]
SqlIdentifiersame name with built-in function but with escape character should be still resolved as an identifier - [CALCITE-2677] Struct types with one field are not mapped correctly to Java classes
- [CALCITE-2703]
Reduce code generation and class loading overhead when executing queries in
EnumerableConvention - [CALCITE-2722]
SqlImplementor.createLeftCallmethod throwsStackOverflowError - [CALCITE-2727] Materialized view rewriting bails out incorrectly when a view does not contain any table reference
- [CALCITE-2733]
Use
catalogandschemafrom JDBC connect string to retrieve tables if specified - [CALCITE-2750]
PIoperator is incorrectly identified as dynamic function - [CALCITE-2755]
Expose document
_idfield when querying ElasticSearch - [CALCITE-2762] Quidem env variable is always false if its name is separated by dot(“.”)
- [CALCITE-2778]
Remove
ClosableAllocation,ClosableAllocationOwner,CompoundClosableAllocation - [CALCITE-2782] Use server time zone by default if time zone is not specified in the user connection string
- [CALCITE-2783]
“COALESCE(s, TRUE) = TRUE” and “(s OR s IS UNKNOWN) = TRUE” causes
NullPointerException - [CALCITE-2785]
In
EnumerableAggregate, wrong result produced If there are sorted aggregates and non-sorted aggregates at the same time - [CALCITE-2787] JSON aggregate calls with different null clause get incorrectly merged while converting from SQL to relational algebra
- [CALCITE-2790]
AggregateJoinTransposeRuleincorrectly pushes down distinct count into join - [CALCITE-2797]
Support
APPROX_COUNT_DISTINCTaggregate function in ElasticSearch - [CALCITE-2798]
Optimizer should remove
ORDER BYin sub-query, provided it has noLIMITorOFFSET - [CALCITE-2802]
In Druid adapter, use of range conditions like
'2010-01-01' < TIMESTAMPleads to incorrect results - [CALCITE-2805] Can’t specify port with Cassandra adapter in connection string
- [CALCITE-2806] Cassandra adapter doesn’t allow uppercase characters in table names
- [CALCITE-2811] Update version of Cassandra driver
- [CALCITE-2814]
In ElasticSearch adapter, fix
GROUP BYwhen using raw item access (e.g._MAP*[‘a.b.c’]) - [CALCITE-2817]
Make
CannotPlanExceptionmore informative - [CALCITE-2827]
Allow
CONVENTION.NONEplanning withVolcanoPlanner - [CALCITE-2838]
Simplification: Remove redundant
IS TRUEchecks - [CALCITE-2839]
Simplify comparisons against
BOOLEANliterals - [CALCITE-2840]
RexNodesimplification logic should use more specificUnknownAsmodes - [CALCITE-2841] Simplification: push negation into Case expression
- [CALCITE-2842]
Computing
RexCalldigest containingINexpressions leads to exceptions - [CALCITE-2848] Simplifying a CASE statement's first branch should ignore its safety
- [CALCITE-2850]
Geode adapter: support
BOOLEANcolumn as filter operand - [CALCITE-2852] RexNode simplification does not traverse unknown functions
- [CALCITE-2856]
Emulating
COMMA JOINasCROSS JOINforSparkSqlDialect - [CALCITE-2858] Improvements in JSON writer and reader for plans
- [CALCITE-2859] Centralize Calcite system properties
- [CALCITE-2863]
In ElasticSearch adapter, query fails when filtering directly on
_MAP - [CALCITE-2887]
Improve performance of
RexLiteral.toJavaString() - [CALCITE-2897]
Reduce expensive calls to
Class.getSimpleName() - [CALCITE-2899]
Deprecate
RelTraitPropagationVisitorand remove its usages - [CALCITE-2890]
In ElasticSearch adapter, combine
any_valuewith other aggregation functions failed - [CALCITE-2891] Alias suggester failed to suggest name based on original name incrementally
- [CALCITE-2894]
RelMdPercentageOriginalRowsthrowsNullPointerExceptionwhen explaining plan with all attributes - [CALCITE-2902]
Improve performance of
AbstractRelNode.computeDigest() - [CALCITE-2929]
Simplification of
IS NULLchecks are incorrectly assuming thatCASTs are possible - Improve Graphviz dump in
CannotPlanException: make boxes shorter, print composite traits if they were simplified - Make
SparkHandlerImplsingleton thread-safe - Remove usage of
userConfigattribute in ElasticSearch adapter - In ElasticSearch adapter, remove dead (or unnecessary) code
Build and test suite
- [CALCITE-2732] Upgrade Postgres driver version
- [CALCITE-2759]
Update
maven-remote-resources-pluginto 1.6.0 - [CALCITE-2765] Bump Janino compiler dependency to 3.0.11
- [CALCITE-2768]
PlannerTestignores top-levelORDER BYclause (RootRel.collation) - [CALCITE-2788]
Building error for sub-project of calcite on
maven-checkstyle-plugin - [CALCITE-2779]
Remove references to
StringBuffer - [CALCITE-2875]
Some misspellings in
RelOptListener - [CALCITE-2895]
Some arguments are undocumented in constructor of
LogicalAggregate - [CALCITE-2836]
Remove
maven-compiler-pluginfromcalcite-plusmodulepom.xml - [CALCITE-2878]
Avoid
throw new RuntimeException(e)in tests - [CALCITE-2916] Upgrade jackson to 2.9.8
- [CALCITE-2925]
Exclude
maven-wrapper.jarfrom source distribution - [CALCITE-2931] In Mongo adapter, compare Bson (not string) query representation in tests
- [CALCITE-2932]
DruidAdapterITregression after 1.17 release - Improve messages for tests based on
CalciteAssert - Add JUnit category for extremely slow tests, launch them in a separate Travis job
- Fix sqlline by removing redundant slf4j dependency (
log4j-over-slf4j) fromcassandra-all
Web site and documentation
- Switch from
maven:alpinetomavenimage for generating javadoc when building the site - Update instructions for pushing to the git site repository
- [CALCITE-2734] Site: Update mongo documentation to reflect filename changes
- Site: Add commit message guidelines for contributors (Stamatis Zampetakis)
- Site: Add Zoltan Haindrich as committer
- Site: Elastic query example on
_MAP - Site: fix JSON syntax error at file adapter page (Marc Prud’hommeaux)
- Site: fix typo at the main page (Marc Prud’hommeaux)
- [CALCITE-2436] Steps for building site under Windows; fix misprint in SQL Language page
- Site: News item for release 1.18
- Site: Rename MapD to OmniSci, and update logos
- Update site for new repository
- Update git URL
- Site: ElasticAdapter mention supported versions (and support schedule)
- Site: Improve documentation for ElasticSearch Adapter
- Site: Update PMC chair
- Update year in NOTICE
1.18.0 / 2018-12-21
With over 200 commits from 36 contributors, this is the largest Calcite release ever. To the SQL dialect, we added JSON functions and linear regression functions, the WITHIN GROUP clause for aggregate functions; there is a new utility to recommend lattices based on past queries, and improvements to expression simplification, the SQL advisor, and the Elasticsearch and Apache Geode adapters.
Compatibility: This release is tested
on Linux, macOS, Microsoft Windows;
using Oracle JDK 8, 9, 10, 11 and OpenJDK 10, 11;
Guava versions 19.0 to 27.0.1-jre;
Druid version 0.11.0;
other software versions as specified in pom.xml.
New features
- [CALCITE-2662]
In
Planner, allow parsing a stream (Reader) instead of aString(Enrico Olivelli) - [CALCITE-2699]
TIMESTAMPADDfunction now applies toDATEandTIMEas well asTIMESTAMP(xuqianjin) - [CALCITE-563] In JDBC adapter, push bindable parameters down to the underlying JDBC data source (Vladimir Sitnikov, Piotr Bojko)
- [CALCITE-2663]
In DDL parser, add
CREATEandDROP FUNCTION(ambition119) - [CALCITE-2266]
Implement SQL:2016 JSON functions:
JSON_EXISTS,JSON_VALUE,JSON_QUERY,JSON_OBJECT,JSON_OBJECTAGG,JSON_ARRAY,JSON_ARRAYAGG,x IS JSONpredicate (Hongze Zhang) - [CALCITE-2224]
Support
WITHIN GROUPclause for aggregate functions (Hongze Zhang) - [CALCITE-2405]
In Babel parser, make 400 reserved keywords including
YEAR,SECOND,DESCnon-reserved - [CALCITE-1870] Lattice suggester
- [CALCITE-2571]
TRIMfunction now trims more than one character (Andrew Pilloud) - [CALCITE-2112] Add Maven wrapper for Calcite (Ratandeep S. Ratti)
- [CALCITE-1026] Allow models in YAML format
- [CALCITE-2402]
Implement regression functions:
COVAR_POP,COVAR_SAMP,REGR_COUNT,REGR_SXX,REGR_SYY - SQL advisor (
SqlAdvisor):- [CALCITE-2479] Automatically quote identifiers that look like SQL keywords
- [CALCITE-2478]
Purge
from_clausewhen_suggest_token is located in one of theFROMsub-queries - [CALCITE-2477] Scalar sub-queries
- [CALCITE-2476]
Produce hints when sub-query with
*is present in query - [CALCITE-2475]
Support
MINUS - [CALCITE-2473]
Support
--comments - [CALCITE-2434] Hints for nested tables and schemas
- [CALCITE-2433] Configurable quoting characters
- Relational algebra builder (
RelBuilder):- [CALCITE-2661]
Add methods for creating
ExchangeandSortExchangerelational expressions (Chunwei Lei) - [CALCITE-2654] Add a fluent API for building complex aggregate calls
- [CALCITE-2441]
RelBuilder.scanshould expandTranslatableTableand views - [CALCITE-2647]
Add a
groupKeymethod that assumes only one grouping set - [CALCITE-2470]
projectmethod should combine expressions if the underlying node is aProject
- [CALCITE-2661]
Add methods for creating
- Elasticsearch adapter:
- [CALCITE-2679]
Implement
DISTINCTandGROUP BYwithout aggregate functions (Siyuan Liu) - [CALCITE-2689]
Allow grouping on non-textual fields like
DATEandNUMBER - [CALCITE-2651] Enable scrolling for basic search queries
- [CALCITE-2585]
Support
NOToperator - [CALCITE-2578]
Support
ANY_VALUEaggregate function - [CALCITE-2528]
Support
Aggregate(Andrei Sereda)
- [CALCITE-2679]
Implement
- Apache Geode adapter:
- [CALCITE-2709]
Allow filtering on
DATE,TIME,TIMESTAMPfields (Sandeep Chada) - [CALCITE-2671]
GeodeFilternow converts multipleORpredicates (on same attribute) into a singleIN SET(Sandeep Chada) - [CALCITE-2498]
Geode adapter wrongly quotes
BOOLEANvalues as strings (Andrei Sereda)
- [CALCITE-2709]
Allow filtering on
Bug-fixes, API changes and minor enhancements
- [CALCITE-2670] Combine similar JSON aggregate functions in operator table
- [CALCITE-2468]
Validator throws
IndexOutOfBoundsExceptionwhen trying to infer operand type fromSTRUCTreturn type (Rong Rong) - [CALCITE-2596] When translating correlated variables in enumerable convention, convert not-null boxed primitive values to primitive (Stamatis Zampetakis)
- [CALCITE-2684]
RexBuildergivesAssertionErrorwhen creating integer literal larger than 263 (Ruben Quesada Lopez) - [CALCITE-2719]
In JDBC adapter for MySQL, fix cast to
INTEGERandBIGINT(Piotr Bojko) - [CALCITE-2713]
JDBC adapter may generate casts on Postgres for
VARCHARtype exceeding max length - [CALCITE-2529] All numbers are in the same type family (Andrew Pilloud)
- [CALCITE-2701]
Make generated
Bazclasses immutable (Stamatis Zampetakis) - [CALCITE-2619] Reduce string literal creation cost by deferring and caching charset conversion (Ted Xu)
- [CALCITE-2720]
RelMetadataQuery.getTableOriginthrowsIndexOutOfBoundsExceptionifRelNodehas no columns (Zoltan Haindrich) - [CALCITE-2717]
Use
Internerinstead ofLoadingCacheto cache traits, and so allow traits to be garbage-collected (Haisheng Yuan) - [CALCITE-2542]
In SQL parser, allow
.fieldto follow any expression, not just tables and columns (Rong Rong) - [CALCITE-2637]
In SQL parser, allow prefix ‘-‘ between
BETWEENandAND(Qi Yu) - [CALCITE-2632]
Ensure that
RexNodeand its sub-classes implementhashCodeandequalsmethods (Zoltan Haindrich) - [CALCITE-2494]
RexFieldAccessshould implementequalsandhashCodemethods - [CALCITE-2715] In JDBC adapter, do not generate character set in data types for MS SQL Server (Piotr Bojko)
- [CALCITE-2714]
Make
BasicSqlTypeimmutable, and nowSqlTypeFactory.createWithNullabilitycan reuse existing type if possible (Ruben Quesada Lopez) - [CALCITE-2687]
IS DISTINCT FROMcould lead to exceptions inReduceExpressionsRule(Zoltan Haindrich) - [CALCITE-2673]
SqlDialectsupports pushing of all functions by default - [CALCITE-2675]
Type validation error as
ReduceExpressionsRulefails to preserve type nullability (Zoltan Haindrich) - [CALCITE-2669]
RelMdTableReferencesshould check whether references inferred from input are null forUnion/Joinoperators - Following [CALCITE-2031] remove incorrect “Not implemented” message
- [CALCITE-2668]
Support for left/right outer join in
RelMdExpressionLineage - Fix invocation of deprecated constructor of
SqlAggFunction(Hongze Zhang) - [CALCITE-2652]
SqlNodeto SQL conversion fails if the join condition references aBOOLEANcolumn (Zoltan Haindrich) - [CALCITE-2657]
In
RexShuttle, useRexCall.cloneinstead ofnew RexCall(Chunwei Lei) - [CALCITE-2605]
Support semi-join via
EnumerableCorrelate(Ruben Quesada Lopez) - [CALCITE-2605]
Support left outer join via
EnumerableCorrelate - [CALCITE-1174]
When generating SQL, translate
SUM0(x)toCOALESCE(SUM(x), 0) RelBuilder.toString()- [CALCITE-2617]
Add a variant of
FilterProjectTransposeRulethat can push down aFilterthat contains correlated variables (Stamatis Zampetakis) - [CALCITE-2638]
Constant reducer should not treat as constant an
RexInputRefthat points to a call to a dynamic or non-deterministic function (Danny Chan) - [CALCITE-2628]
JDBC adapter throws
NullPointerExceptionwhile generatingGROUP BYquery for MySQL - [CALCITE-2404] Implement access to structured-types in enumerable runtime (Stamatis Zampetakis)
- [CALCITE-2622]
RexFieldCollation.toString()method is not deterministic - [CALCITE-2611]
Linq4j code generation failure if one side of an
ORcontainsUNKNOWN(Zoltan Haindrich) - Canonize simple cases for composite traits in trait factory
- [CALCITE-2591]
EnumerableDefaults#mergeJoinshould throw error and not return incorrect results when inputs are not ordered (Enrico Olivelli) - Test case for
[CALCITE-2592]
EnumerableMergeJoinis never taken - [CALCITE-2526]
Add test for
ORwith nullable comparisons (pengzhiwei) - [CALCITE-2413] Use raw signatures for classes with generics when producing Java code
- In Elasticsearch adapter, remove redundant null check in
CompoundQueryExpression - [CALCITE-2562]
Remove dead code in
StandardConvertletTable#convertDatetimeMinus - Avoid
NullPointerExceptionwhenFlatListcontains null elements - [CALCITE-2561]
Remove dead code in
Latticeconstructor - Apply small refactorings to Calcite codebase (Java 5, Java 7, Java 8)
- [CALCITE-2572]
SQL standard semantics for
SUBSTRINGfunction (Andrew Pilloud) - Remove dead code:
Compatible,CompatibleGuava11 - Remove “Now, do something with table” from standard output when implementing sequences
- [CALCITE-2444]
Handle
INexpressions when convertingSqlNodeto SQL (Zoltan Haindrich) - [CALCITE-2537]
Use litmus for
VolcanoPlanner#validate - [CALCITE-2546]
Reduce precision of
Profiler’ssurpriseandcardinalityattributes to avoid floating point discrepancies (Alisha Prabhu) - [CALCITE-2563] Materialized view rewriting may swap columns in equivalent classes incorrectly
- [CALCITE-2551]
SqlToRelConvertergivesClassCastExceptionwhile handlingINinsideWHERE NOT CASE(pengzhiwei) - Remove redundant
newexpression in constant array creation - [CALCITE-2474] SqlAdvisor: avoid NPE in lookupFromHints where FROM is empty
- [CALCITE-2418]
Remove
matchRecognizefield ofSqlSelect - [CALCITE-2514]
Add
SqlIdentifierconversion toITEMoperator for dynamic tables inExtendedExpander(Arina Ielchiieva) - [CALCITE-2491]
Refactor
NameSet,NameMap, andNameMultimap - [CALCITE-2520]
Make
SparkHandlerImpl#compilesilent by default, print code incalcite.debug=truemode only - [CALCITE-1026] Remove unused import
- [CALCITE-2483]
Druid adapter, when querying Druid segment metadata, throws when row number is
larger than
Integer.MAX_VALUE(Hongze Zhang) - Support
AND,OR,COALESCE,IS [NOT] DISTINCTinRexUtil#op - [CALCITE-2495]
Support encoded URLs in
org.apache.calcite.util.Source, and use it for URL → File conversion in tests - [CALCITE-2271]
Join of two views with window aggregates produces incorrect results or throws
NullPointerException - [CALCITE-2481]
NameSetassumes lower-case characters have greater codes, which does not hold for certain characters - [CALCITE-2480]
NameSet.containswrongly returnsfalsewhen element in set is upper-case andseekis lower-case - [CALCITE-2465] Enable use of materialized views for any planner
- [CALCITE-2446] Lateral joins do not work when saved as custom views (Piotr Bojko)
- [CALCITE-2447]
POWER,ATAN2functions fail withNoSuchMethodException - Typo in
HepPlannertrace message (Dylan) - [CALCITE-2416]
AssertionErrorwhen determining monotonicity (Alina Ipatina) - Java 8: use
Map.computeIfAbsentwhen possible - [CALCITE-2431]
SqlUtil.getAncestrythrowsAssertionErrorwhen providing completion hints for sub-schema - [CALCITE-2430]
RelDataTypeImpl.getFieldListthrowsAssertionErrorwhen SQL Advisor inspects non-struct field - [CALCITE-2429]
SqlValidatorImpl.lookupFieldNamespacethrowsNullPointerExceptionwhen SQL Advisor observes non-existing field - [CALCITE-2422] Query with unnest of column from nested sub-query fails when dynamic table is used
- [CALCITE-2417]
RelToSqlConverterthrowsClassCastExceptionwith structs (Benoit Hanotte) - Upgrades:
- [CALCITE-2716] Upgrade to Avatica 1.13.0
- [CALCITE-2711] Upgrade SQLLine to 1.6.0
- [CALCITE-2570]
Upgrade
forbiddenapisto 2.6 for JDK 11 support - [CALCITE-2486] Upgrade Apache parent POM to version 21
- [CALCITE-2467]
Upgrade
owasp-dependency-checkmaven plugin to 3.3.1 - [CALCITE-2559] Update Checkstyle to 7.8.2
- [CALCITE-2497] Update Janino version to 3.0.9
- Expression simplification (
RexSimplify):- [CALCITE-2731]
RexProgramBuildermakes unsafe simplifications toCASEexpressions (Zoltan Haindrich) - [CALCITE-2730]
RelBuilderincorrectly simplifies aFilterwith duplicate conjunction to empty (Stamatis Zampetakis) - [CALCITE-2726]
ReduceExpressionRulemay oversimplify filter conditions containingNULLvalues - [CALCITE-2695] Simplify casts that are only widening nullability (Zoltan Haindrich)
- [CALCITE-2631]
General improvements in simplifying
CASE - [CALCITE-2639]
FilterReduceExpressionsRulecausesArithmeticExceptionat execution time - [CALCITE-2620]
Simplify
COALESCE(NULL, x)→x(pengzhiwei) - [CALCITE-1413] Enhance boolean case statement simplifications (Zoltan Haindrich)
- [CALCITE-2615]
When simplifying
NOT-AND-OR,RexSimplifyincorrectly applies predicates deduced for operands to the same operands (Zoltan Haindrich) - [CALCITE-2604]
When simplifying an expression, say whether an
UNKNOWNvalue will be interpreted as is, or asTRUEorFALSE - [CALCITE-2438]
Fix wrong results for
IS NOT FALSE(FALSE)(zhiwei.pzw) (Zoltan Haindrich) - [CALCITE-2506]
Simplifying
COALESCE(+ nullInt, +vInt())results inAssertionError: result mismatch(pengzhiwei) - [CALCITE-2580]
Simplifying
COALESCE(NULL > NULL, TRUE)produces wrong result filter expressions (pengzhiwei) - [CALCITE-2586]
CASEwith repeated branches givesAssertionError(pengzhiwei) - [CALCITE-2590]
Remove redundant
CASTwhen operand has exactly the same type as it is casted to - Implement fuzzy generator for
CASEexpressions - [CALCITE-2556]
Simplify
NOT TRUE→FALSE, andNOT FALSE→TRUE(pengzhiwei) - [CALCITE-2581]
Avoid errors in simplifying
UNKNOWN AND NOT (UNKNOWN OR ...)(pengzhiwei) - [CALCITE-2527]
Simplify
(c IS NULL) OR (c IS ...)might result in AssertionError: result mismatch (pengzhiwei) - Display random failure of Rex fuzzer in build logs to inspire further fixes
- [CALCITE-2567]
Simplify
IS NULL(NULL)toTRUE(pengzhiwei) - [CALCITE-2555]
RexSimplify: Simplify
x >= NULLtoUNKNOWN(pengzhiwei) - [CALCITE-2504] Add randomized test for better code coverage of rex node create and simplification
- [CALCITE-2469]
Simplify
(NOT x) IS NULL→x IS NULL(pengzhiwei); also, simplifyf(x, y) IS NULL→x IS NULL OR y IS NULLiffis a strong operator - [CALCITE-2327]
Simplify
AND(x, y, NOT(y))→AND(x, null, IS NULL(y)) - [CALCITE-2327]
Avoid simplification of
x AND NOT(x)toFALSEfor nullablex - [CALCITE-2505]
AssertionErrorwhen simplifyingIS [NOT] DISTINCTexpressions (Haisheng Yuan)
- [CALCITE-2731]
Build and test suite
- [CALCITE-2678]
RelBuilderTest#testRelBuilderToStringfails on Windows (Stamatis Zampetakis) - [CALCITE-2660]
OsAdapterTestnow checks whether required commands are available - [CALCITE-2655] Enable Travis to test against JDK 12
- Ensure that tests are not calling
checkSimplify3withexpected,expectedFalse,expectedTrueall the same - Geode adapter tests: Removed unnecessary
try/finalblock inRefCountPolicy - Add license to
TestKtTestand addapache-rat:checkto Travis CI - [CALCITE-2112]
Add Apache license header to
maven-wrapper.properties - [CALCITE-2588] Run Geode adapter tests with an embedded instance
- [CALCITE-2594]
Ensure
forbiddenapisandmaven-compileruse the correct JDK version - [CALCITE-2642]
Checkstyle complains that
maven-wrapper.propertiesis missing a header -
commons:commons-pool2is used in tests only, so usescope=testfor it - Make
findbugs:jsr305dependency optional - [CALCITE-2458] Add Kotlin as a test dependency
- Make build scripts Maven 3.3 compatible
- Fix JavaDoc warnings for Java 9+, and check JavaDoc in Travis CI
- Unwrap invocation target exception from QuidemTest#test
- [CALCITE-2518]
Add
failOnWarningstomaven-javadoc-pluginconfiguration - Silence Pig, Spark, and Elasticsearch logs in tests
- [CALCITE-1894]
CsvTest.testCsvStreamfailing often: add@Ignoresince the test is known to fail - [CALCITE-2535]
Enable
SqlTester.checkFails(previously it was a no-op) (Hongze Zhang) - [CALCITE-2558]
Improve re-compilation times by skipping
parser.javaupdate on each build - Increase timeout for Cassandra daemon startup for
CassandraAdapterTest - [CALCITE-2412] Add Windows CI via AppVeyor (Sergey Nuyanzin)
- Reduce
HepPlannerTest#testRuleApplyCountcomplexity - [CALCITE-2523]
Guard
PartiallyOrderedSetTest#testPosetBitsLargewithCalciteAssert.ENABLE_SLOW - [CALCITE-2521]
Guard
RelMetadataTest#testMetadataHandlerCacheLimitwithCalciteAssert.ENABLE_SLOW - [CALCITE-2484]
Add
SqlValidatorDynamicTesttoCalciteSuite - [CALCITE-2484]
Move dynamic tests to a separate class like
SqlValidatorDynamicTest, and avoid reuse ofMockCatalogReaderDynamic - [CALCITE-2522]
Remove
e.printStackTrace()fromCalciteAssert#returns - [CALCITE-2512]
Move
StreamTest#ROW_GENERATORtoTable.scan().iteratorto make it not shared between threads (Sergey Nuyanzin) - Skip second Checkstyle execution during Travis CI build
- [CALCITE-2519]
Silence ERROR logs from
CalciteException,SqlValidatorExceptionduring tests - [CALCITE-1026]
Fix
ModelTest#testYamlFileDetectionwhen source folder has spaces -
MockCatalogReaderis used in testing, so cache should be disabled there to avoid thread conflicts and/or stale results - [CALCITE-311] Add a test-case for Filter after Window aggregate
- [CALCITE-2462]
RexProgramTest: replacenullLiteral→nullInt,unknownLiteral→nullBoolfor brevity - [CALCITE-2462]
RexProgramTest: move “rex building” methods to base class -
SqlTestFactory: use lazy initialization of objects - [CALCITE-2435]
Refactor
SqlTestFactory - [CALCITE-2428] Cassandra unit test fails to parse JDK version string (Andrei Sereda)
- [CALCITE-2419] Use embedded Cassandra for tests
Web site and documentation
- Add geospatial category to DOAP file
- [CALCITE-2577] Update links on download page to HTTPS
- [CALCITE-2574] Update download page to include instructions for verifying a downloaded artifact
- Update build status badges in
README.md - [CALCITE-2705] Site: Remove duplicate “selectivity” in list of metadata types (Alan Jin)
- Site: Add Andrei Sereda as committer
- Site: Update Julian Hyde’s affiliation
- Update Michael Mior’s affiliation
- Site: Add instructions for updating PRs based on the discussion in the dev list (Stamatis Zampetakis)
- Site: Add committer Sergey Nuyanzin
- Site: News item for release 1.17.0
1.17.0 / 2018-07-16
Compatibility: This release is tested
on Linux, macOS, Microsoft Windows;
using Oracle JDK 8, 9, 10;
Guava versions 19.0 to 23.0;
Druid version 0.11.0;
other software versions as specified in pom.xml.
This release comes four months after 1.16.0. It includes more than 90 resolved issues, comprising a large number of new features as well as general improvements and bug-fixes. Among others:
Implemented Babel SQL parser that accepts all SQL dialects. Allowed JDK 8 language level for core module. Calcite has been upgraded to use Avatica 1.12.0
New features
- [CALCITE-873]
Add a planner rule,
SortRemoveConstantKeysRule, that removes constant keys from Sort (Atri Sharma) - [CALCITE-2045]
CREATE TYPE(Shuyi Chen) - [CALCITE-2216]
Improve extensibility of
AggregateReduceFunctionsRule(Fabian Hueske) - [CALCITE-2227]
Standards-compliant column ordering for
NATURAL JOINandJOIN USING - [CALCITE-2280] Babel SQL parser
- [CALCITE-2286] Support timestamp type for Druid adapter
- [CALCITE-2304]
In Babel parser, allow Hive-style syntax
LEFT SEMI JOIN - [CALCITE-2321]
A union of
CHARcolumns of different lengths can now (based on a conformance setting) yield aVARCHARcolumn (Hequn Cheng)
Bug-fixes, API changes and minor enhancements
- [CALCITE-531]
LATERALcombined with window function or table function - [CALCITE-1167]
OVERLAPSshould match even if operands are in (high, low) order - [CALCITE-1436]
Support
MIN/MAXfunctions (Muhammad Gelbana) - [CALCITE-1866]
JDBC adapter generates incorrect code when pushing
FLOORto MySQL (Kang Wang, Sergey Nuyanzin) - [CALCITE-1916] Use Teradata’s TPC-DS generator and run tests against TPC-DS at small scale
- [CALCITE-1949]
CalciteStatementshould callAvaticaStatementclose_(), to avoid memory leak (Kevin Risden) - [CALCITE-2053]
Resolve Java user-defined functions that have
DoubleandBigDecimalarguments (余启) - [CALCITE-2063]
Add JDK 10 to
.travis.yml - [CALCITE-2159]
Support dynamic row type in
UNNEST(Chunhui Shi) - [CALCITE-2164] Fix alerts raised by lgtm.com (Malcolm Taylor)
- [CALCITE-2188]
JDBC adapter generates invalid SQL for
DATE/INTERVALarithmetic (Rahul Raj) - [CALCITE-2201]
Pass
RelBuilderintoRelDecorrelatorandRelStructuredTypeFlattener(Volodymyr Vysotskyi) - [CALCITE-2205]
JoinPushTransitivePredicatesRuleshould not createFilteron top of equivalentFilter(Vitalii Diravka) - [CALCITE-2206] JDBC adapter incorrectly pushes windowed aggregates down to HSQLDB (Pavel Gubin)
- [CALCITE-2220]
SqlToRelConvertergenerates incorrect ordinal while flattening a record-valued field (Shuyi Chen) - [CALCITE-2222] Add Quarter timeunit as a valid unit to pushdown to Druid
- [CALCITE-2225] Upgrade Apache parent POM to version 19, and support OpenJDK 10
- [CALCITE-2226] Druid adapter: Substring operator converter does not handle non-constant literals correctly
- [CALCITE-2229] Allow sqlsh to be run from path, not just current directory
- [CALCITE-2232]
Assertion error on
AggregatePullUpConstantsRulewhile adjustingAggregateindices - [CALCITE-2236] Druid adapter: Avoid duplication of fields names during Druid query planing
- [CALCITE-2237] Upgrade Maven Surefire plugin to 2.21.0 (Kevin Risden)
- [CALCITE-2238] Fix Pig and Spark adapter failures with JDK 10
- [CALCITE-2240]
Extend rule to push predicates into
CASEstatement (Zoltan Haindrich) - [CALCITE-2242]
Using custom
RelBuilderforFilterRemoveIsNotDistinctFromRule(Vitalii Diravka) - [CALCITE-2247]
Simplify
ANDandORconditions using predicates (Zoltan Haindrich) - [CALCITE-2253]
Fix matching predicate for
JdbcProjectRulerule - [CALCITE-2255] Add JDK 11 to Travis CI
- [CALCITE-2259] Allow Java 8 syntax
- [CALCITE-2261] Switch core module to JDK 8 (Enrico Olivelli)
- [CALCITE-2262] Druid adapter: Allow count(*) to be pushed when other aggregate functions are present
- [CALCITE-2264] In JDBC adapter, do not push down a call to a user-defined function (UDF) (Piotr Bojko)
- [CALCITE-2265] Allow comparison of ROW values (Dylan Adams)
- [CALCITE-2267]
Thread-safe generation of
AbstractRelNode.id(Zhong Yu) - [CALCITE-2275]
Do not push down
NOTcondition inJOIN(Vitalii Diravka) - [CALCITE-2276]
Allow explicit
ROWvalue constructor inSELECTclause and elsewhere (Danny Chan) - [CALCITE-2277]
Skip
SemiJoinoperator in materialized view-based rewriting algorithm - [CALCITE-2278]
AggregateJoinTransposeRulefails to split aggregate call if input contains an aggregate call and has distinct rows (Haisheng Yuan) - [CALCITE-2281]
Return type of the
TIMESTAMPADDfunction has wrong precision (Sudheesh Katkam) - [CALCITE-2287]
FlatList.equals()throwsStackOverflowError(Zhen Wang, Zhong Yu) - [CALCITE-2291] Support Push Project past Correlate (Chunhui Shi)
- [CALCITE-2293] Upgrade forbidden-apis to 2.5 (for JDK 10)
- [CALCITE-2299]
TIMESTAMPADD(SQL_TSI_FRAC_SECOND) should be nanoseconds (Sergey Nuyanzin) - [CALCITE-2303]
In
EXTRACTfunction, supportMICROSECONDS,MILLISECONDS,EPOCH,ISODOW,ISOYEARandDECADEtime units (Sergey Nuyanzin) - [CALCITE-2305]
JDBC adapter generates invalid casts on Postgres, because Postgres does not have
TINYINTandDOUBLEtypes - [CALCITE-2306]
AssertionError in
RexLiteral.getValue3with null literal of typeDECIMAL(Godfrey He) - [CALCITE-2309] Dialects: Hive dialect does not support charsets in constants
- [CALCITE-2314] Verify RexNode transformations by evaluating before and after expressions against sample values
- [CALCITE-2316] Elasticsearch adapter should not convert queries to lower-case (Andrei Sereda)
- [CALCITE-2318]
NumberFormatExceptionwhile starting SQLLine - [CALCITE-2319] Set correct dimension type for druid expressions with result type boolean (nsihantmonu51)
- [CALCITE-2320]
Filtering UDF when converting
FiltertoJDBCFilter(Piotr Bojko) - [CALCITE-2323]
Apply “
defaultNullCollation” configuration parameter when translatingORDER BYinsideOVER(John Fang) - [CALCITE-2324]
EXTRACTfunction:HOUR,MINUTEandSECONDparts of aDATEmust be zero (Sergey Nuyanzin) - [CALCITE-2329] Improve rewrite for “constant IN (sub-query)”
- [CALCITE-2331]
Evaluation of predicate
(A or B) and Cfails for Elasticsearch adapter (Andrei Sereda) - [CALCITE-2332]
Wrong simplification of
FLOOR(CEIL(x))toFLOOR(x) - [CALCITE-2333] Stop releasing zips
- [CALCITE-2334]
Extend simplification of expressions with
CEILfunction over date types - [CALCITE-2341]
Fix
ImmutableBitSetTestfor jdk11 - [CALCITE-2342] Fix improper use of assert
- [CALCITE-2345] Running Unit tests with Fongo and integration tests with real mongo instance (Andrei Sereda)
- [CALCITE-2347] Running ElasticSearch in embedded mode for unit tests of ES adapter (Andrei Sereda)
- [CALCITE-2353]
Allow user to override
SqlSetOption(Andrew Pilloud) - [CALCITE-2355] Implement multiset operations (Sergey Nuyanzin)
- [CALCITE-2357] Freemarker dependency override issue in fmpp maven plugin (yanghua)
- [CALCITE-2358] Use null literal instead of empty string (b-slim)
- [CALCITE-2359] Inconsistent results casting intervals to integers (James Duong)
- [CALCITE-2364] Fix timezone issue (in test) between Mongo DB and local JVM (Andrei Sereda)
- [CALCITE-2365] Upgrade avatica to 1.12
- [CALCITE-2366]
Add support for
ANY_VALUEaggregate function (Gautam Parai) - [CALCITE-2368]
Fix
misc.iqandscalar.iqquidem unit tests failures on Windows - [CALCITE-2369]
Fix
OsAdapterTestfailure on windows (Sergey Nuyanzin) - [CALCITE-2370] Fix failing mongo IT tests when explicit order was not specified (Andrei Sereda)
- [CALCITE-2376] Unify ES2 and ES5 adapters. Migrate to low-level ES rest client as main transport (Andrei Sereda)
- [CALCITE-2379] CVSS dependency-check-maven fails for calcite-spark and calcite-ubenchmark modules
- [CALCITE-2380] Javadoc generation failure in Elasticsearch2 adapter (Andrei Sereda)
- [CALCITE-2381] Add information for authenticating against maven repo, GPG keys and version numbers to HOWTO
- [CALCITE-2382] Sub-query join lateral table function (pengzhiwei)
- [CALCITE-2383]
NTH_VALUEwindow function (Sergey Nuyanzin) - [CALCITE-2384]
Performance issue in
getPulledUpPredicates(Zoltan Haindrich) - [CALCITE-2387]
Fix for
date/timestampcast expressions in Druid adapter - [CALCITE-2388]
Upgrade from
commons-dbcptocommons-dbcp2version 2.4.0 - [CALCITE-2391]
Aggregate query with
UNNESTorLATERALfails withClassCastException - [CALCITE-2392]
Prevent columns permutation for
NATURAL JOINandJOIN USINGwhen dynamic table is used - [CALCITE-2396]
Allow
NULLintervals inTIMESTAMPADDandDATETIME_PLUSfunctions (James Duong) - [CALCITE-2398]
SqlSelectmust call intoSqlDialectfor unparse (James Duong) - [CALCITE-2403] Upgrade quidem to 0.9
- [CALCITE-2409]
SparkAdapterTestfails on Windows when ‘/tmp’ directory does not exist (Sergey Nuyanzin)
1.16.0 / 2018-03-14
Compatibility: This release is tested
on Linux, macOS, Microsoft Windows;
using Oracle JDK 8, 9, 10;
Guava versions 19.0 to 23.0;
Druid version 0.11.0;
other software versions as specified in pom.xml.
This release comes three months after 1.15.0. It includes more than 80 resolved issues, comprising a large number of new features as well as general improvements and bug-fixes to Calcite core. Among others:
- Calcite has been upgraded to use Avatica 1.11.0, which was recently released.
- Moreover, a new adapter to
read data from Apache Geode
was added in this release. In addition, more progress has been made for the existing adapters,
e.g., the Druid adapter can generate
SCANqueries rather thanSELECTqueries for more efficient execution and it can push more work to Druid using its new expressions capabilities, and the JDBC adapter now supports the SQL dialect used by Jethro Data. - Finally, this release drops support for JDK 1.7 and support for Guava versions earlier than 19.
New features
- [CALCITE-1265]
In JDBC adapter, push
OFFSETandFETCHto data source - [CALCITE-2059] Apache Geode adapter (Christian Tzolov)
- [CALCITE-2077]
Druid adapter: Use
SCANquery rather thanSELECTquery (Nishant Bangarwa) - [CALCITE-2128] In JDBC adapter, add SQL dialect for Jethro Data (Jonathan Doron)
- [CALCITE-2170] Use Druid Expressions capabilities to improve the amount of work that can be pushed to Druid
Bug-fixes, API changes and minor enhancements
- [CALCITE-1054] NPE caused by wrong code generation for Timestamp fields
- [CALCITE-1188]
NullPointerException in
EXTRACTwithWHERE ... INclause if field has null value - [CALCITE-1427] Code generation incorrect (does not compile) for DATE, TIME and TIMESTAMP fields
- [CALCITE-1658]
DateRangeRules incorrectly rewrites
EXTRACTcalls (Nishant Bangarwa) - [CALCITE-1697] Update Mongo driver version to 3.5.0 (Vladimir Dolzhenko)
- [CALCITE-2002]
DISTINCTapplied toVALUESreturns wrong result - [CALCITE-2009]
Possible bug in interpreting
( IN ) OR ( IN )logic - [CALCITE-2020] Upgrade org.incava java-diff
- [CALCITE-2027] Drop support for Java 7 (JDK 1.7)
- [CALCITE-2034]
FileReaderTestfails with path containing spaces - [CALCITE-2066]
RelOptUtil.splitJoinCondition()could not split condition with case after applyingFilterReduceExpressionsRule(Volodymyr Vysotskyi) - [CALCITE-2071]
Query with
INandORinWHEREclause returns wrong result (Vineet Garg) - [CALCITE-2072] Enable spatial functions by adding ‘fun=spatial’ to JDBC connect string
- [CALCITE-2075] SparkAdapterTest UT fails
- [CALCITE-2076] Upgrade to Druid 0.11.0 (Nishant Bangarwa)
- [CALCITE-2080]
Query with
NOT INoperator and literal throwsAssertionError: ‘Cast for just nullability not allowed’ (Volodymyr Vysotskyi) - [CALCITE-2081]
Query with windowed aggregates under both sides of a
JOINthrowsNullPointerException(Zhen Wang) - [CALCITE-2084]
SqlValidatorImpl.findTable()method incorrectly handles table schema with few schema levels (Volodymyr Vysotskyi) - [CALCITE-2088] Add more complex end-to-end tests in “plus” module, using Chinook data set (Piotr Bojko)
- [CALCITE-2089]
Druid adapter: Push filter on
floor(time)to Druid (Nishant Bangarwa) - [CALCITE-2090] Extend Druid Range Rules to extract interval from Floor (Nishant Bangarwa)
- [CALCITE-2091]
Improve DruidQuery cost function, to ensure that
EXTRACTgets pushed as an interval if possible - [CALCITE-2092]
Allow passing custom
RelBuilderintoSqlToRelConverter - [CALCITE-2093]
OsAdapterTestin Calcite Plus does not respect locale (Piotr Bojko) - [CALCITE-2094]
Druid adapter:
Count(*)returns null instead of 0 when condition filters all rows - [CALCITE-2095] Druid adapter: Push always true and always true expressions as Expression Filters
- [CALCITE-2096]
Druid adapter: Remove extra
dummy_aggregator - [CALCITE-2097] Druid adapter: Push Aggregate and Filter operators containing metric columns to Druid
- [CALCITE-2098]
Push filters to Druid Query Scan when we have
ORofANDclauses - [CALCITE-2099]
Code generated for
GROUP BYinsideUNIONdoes not compile (Zhen Wang) - [CALCITE-2101] Druid adapter: Push count(column) using Druid filtered aggregate
- [CALCITE-2102]
Ignore duplicate
ORDER BYkeys, and ensure RelCollation contains no duplicates (John Fang) - [CALCITE-2104]
Add separate rules for
AggregateUnionAggregateRuleto reduce potential matching cost inVolcanoPlanner(lincoln-lil) - [CALCITE-2105]
AggregateJoinTransposeRulefails when process aggregate without group keys (jingzhang) - [CALCITE-2107]
Timezone not passed as part of granularity when passing
TimeExtractionFunctionto Druid (Nishant Bangarwa) - [CALCITE-2108]
AggregateJoinTransposeRulefails when process aggregateCall aboveSqlSumEmptyIsZeroAggFunctionwithout groupKeys (jingzhang) - [CALCITE-2110]
ArrayIndexOutOfBoundsExceptionin RexSimplify when usingReduceExpressionsRule.JOIN_INSTANCE - [CALCITE-2111] Make HepPlanner more efficient by applying rules depth-first
- [CALCITE-2113] Push column pruning to druid when Aggregate cannot be pushed (Nishant Bangarwa)
- [CALCITE-2114]
Re-enable
DruidAggregateFilterTransposeRule - [CALCITE-2116] The digests are not same for the common sub-expressions in HepPlanner (LeoWangLZ)
- [CALCITE-2118] RelToSqlConverter should only generate “*” if field names match (Sam Waggoner)
- [CALCITE-2122]
In DateRangeRules, make either
TIMESTAMPorDATEliteral, according to target type (Nishant Bangarwa) - [CALCITE-2124]
AggregateExpandDistinctAggregatesRuleshould makeSUMnullable if there is noGROUP BY(Godfrey He) - [CALCITE-2127] In Interpreter, allow a node to have more than one consumer
- [CALCITE-2133] Allow SqlGroupedWindowFunction to specify returnTypeInference in its constructor (Shuyi Chen)
- [CALCITE-2135]
If there is an aggregate function inside an
OVERclause, validator should treat query as an aggregate query (Volodymyr Tkach) - [CALCITE-2137] Materialized view rewriting not being triggered for some join queries
- [CALCITE-2139] Upgrade checkstyle
- [CALCITE-2143] RelToSqlConverter produces incorrect SQL with aggregation (Sam Waggoner)
- [CALCITE-2147] GroupingSets involving rollup resulting into an incorrect plan (Ravindar Munjam)
- [CALCITE-2154] Upgrade jackson to 2.9.4
- [CALCITE-2156]
In DateRangeRules, compute
FLOORandCEILofTIMESTAMP WITH LOCAL TIMEZONEin local time zone (Nishant Bangarwa) - [CALCITE-2162] Exception when accessing sub-field of sub-field of composite Array element (Shuyi Chen)
- [CALCITE-2178]
Extend expression simplifier to work on datetime
CEIL/FLOORfunctions - [CALCITE-2179] General improvements for materialized view rewriting rule
- [CALCITE-2180] Invalid code generated for negative of byte and short values
- [CALCITE-2183]
Implement
RelSubset.copymethod (Alessandro Solimando) - [CALCITE-2185] Additional unit tests for Spark Adapter (Alessandro Solimando)
- [CALCITE-2187]
Fix build issue caused by
CALCITE-2170 - [CALCITE-2189] RelMdAllPredicates fast bail out creates mismatch with RelMdTableReferences
- [CALCITE-2190] Extend SubstitutionVisitor.splitFilter to cover different order of operands
- [CALCITE-2191] Drop support for Guava versions earlier than 19
- [CALCITE-2192] RelBuilder wrongly skips creating an Aggregate that prunes columns, if input is unique
- [CALCITE-2195]
AggregateJoinTransposeRulefails to aggregate over unique column (Zhong Yu) - [CALCITE-2196] Tweak janino code generation to allow debugging (jingzhang)
- [CALCITE-2197] Test failures on Windows
- [CALCITE-2200] Infinite loop for JoinPushTransitivePredicatesRule
- [CALCITE-2207] Enforce Java version via maven-enforcer-plugin (Kevin Risden)
- [CALCITE-2213] Geode integration tests are failing
Web site and documentation
- [CALCITE-2024] Submit a journal paper on Calcite to VLDB Journal or ACM SIGMOD Record (Edmon Begoli)
- [CALCITE-2203] Calcite site redirect links to Avatica broken with jekyll-redirect-from 0.12+ (Kevin Risden)
1.15.0 / 2017-12-11
Compatibility: This release is tested
on Linux, macOS, Microsoft Windows;
using Oracle JDK 7, 8, 9, 10;
Guava versions 14.0 to 23.0;
Druid version 0.10.0;
other software versions as specified in pom.xml.
This release comes three months after 1.14.0. It includes than 44 resolved issues, mostly modest improvements and bug-fixes, but here are some features of note:
- [CALCITE-707] adds DDL commands to Calcite for the first time, including CREATE and DROP commands for schemas, tables, foreign tables, views, and materialized views. We know that DDL syntax is a matter of taste, so we added the extensions to a new “server” module, leaving the “core” parser unchanged;
- [CALCITE-2061]
allows dynamic parameters in the
LIMITandOFFSETand clauses; - [CALCITE-1913] refactors the JDBC adapter to make it easier to plug in a new SQL dialect;
- [CALCITE-1616] adds a data profiler, an algorithm that efficiently analyzes large data sets with many columns, estimating the number of distinct values in columns and groups of columns, and finding functional dependencies. The improved statistics are used by the algorithm that designs summary tables for a lattice.
Calcite now supports JDK 10 and Guava 23.0. (It continues to run on JDK 7, 8 and 9, and on versions of Guava as early as 14.0.1. The default version of Guava remains 19.0, the latest version compatible with JDK 7 and the Cassandra adapter’s dependencies.)
This is the last release that will support JDK 1.7.
New features
- [CALCITE-1616] Data profiler
- [CALCITE-2061]
Dynamic parameters in
OFFSET,FETCHandLIMITclauses (Enrico Olivelli) - [CALCITE-707] Add “server” module, with built-in support for simple DDL statements
- [CALCITE-2041]
When
ReduceExpressionRulesimplifies a nullable expression, allow the result to change type toNOT NULL - [CALCITE-2058] Support JDK 10
- [CALCITE-2016]
Make item + dot operators work for array (e.g.
SELECT orders[5].color FROM t(Shuyi Chen) - [CALCITE-2035]
Allow approximate aggregate functions, and add
APPROX_COUNT_DISTINCT - [CALCITE-1990]
Make
RelDistributionextendRelMultipleTrait(LeoWangLZ) - [CALCITE-1867] Allow user-defined grouped window functions (Timo Walther)
- [CALCITE-2031]
ST_XandST_YGIS functions - [CALCITE-1913]
Pluggable SQL dialects for JDBC adapter: Replace usages of
DatabaseProductwith dialect methods, and introduce a configurableSqlDialectFactory(Christian Beikov)
Bug-fixes, API changes and minor enhancements
- [CALCITE-2078]
Aggregate functions in
OVERclause (Liao Xintao) - [CALCITE-2070] Git test fails when run from source distro
- [CALCITE-1808]
JaninoRelMetadataProviderloading cache might causeOutOfMemoryError - [CALCITE-2069]
RexSimplify.removeNullabilityCast()always removes cast for operand withANYtype (Volodymyr Vysotskyi) - [CALCITE-2074] Simplification of point ranges that are open above or below yields wrong results
- [CALCITE-2005] Test failures on Windows
- Add
ImmutableBitSet.set(int, boolean) - [CALCITE-2054]
Error while validating
UPDATEwith dynamic parameter inSETclause (Enrico Olivelli) - [CALCITE-2055] Check year, month, day, hour, minute and second ranges for date and time literals (Volodymyr Vysotskyi)
- [CALCITE-2051]
Rules using
Aggregatemight check for simple grouping sets incorrectly - Add parameter to
SqlCallBinding.getOperandLiteralValue(int)to specify desired value type - [CALCITE-2039]
AssertionErrorwhen pushing project toProjectableFilterableTable - [CALCITE-2050] Exception when pushing post-aggregates into Druid
- [CALCITE-2043]
Use custom
RelBuilderimplementation in some rules (Volodymyr Vysotskyi) - [CALCITE-2044]
Tweak cost of
BindableTableScanto make sureProjectis pushed throughAggregate(Luis Fernando Kauer) - [CALCITE-2012]
Replace
LocalIntervalbyIntervalin Druid adapter - [CALCITE-1984]
Incorrect rewriting with materialized views using
DISTINCTin aggregate functions - [CALCITE-1876]
In CSV example, tweak cost to ensure that
Projectis pushed throughAggregate(Luis Fernando Kauer) - [CALCITE-2037]
Modify parser template to allow sub-projects to override
SqlStmtsyntax (Roman Kulyk) - [CALCITE-2019]
Druid’s time column is NOT NULL, so push
COUNT(druid_time_column)as if it wereCOUNT(*) - [CALCITE-2034]
FileReaderTestfails with path containing spaces (Marc Prud’hommeaux) - [CALCITE-2028]
SubQueryRemoveRuleshould createJoin, notCorrelate, for un-correlated sub-queries (Liao Xintao) - [CALCITE-2029]
Query with
IS DISTINCT FROMcondition inWHEREorJOINclause fails withAssertionError, “Cast for just nullability not allowed” (Volodymyr Vysotskyi) - [CALCITE-1998]
Hive
ORDER BYnull values (Abbas Gadhia) - [CALCITE-2014]
Look for
saffron.propertiesfile in classpath rather than in working directory (Arina Ielchiieva) - [CALCITE-1910]
NullPointerExceptionon filtered aggregators usingIN - [CALCITE-1762] Upgrade to Spark 2.X
- [CALCITE-2008]
Fix braces in
TRIMsignature - [CALCITE-2007]
Fix
RexSimplifybehavior when literals come first - [CALCITE-2006]
Push
IS NULLandIS NOT NULLpredicates to Druid - [CALCITE-1996]
In JDBC adapter, generate correct
VALUESsyntax - [CALCITE-2001] JDBC driver should return “SYSTEM TABLE” rather than “SYSTEM_TABLE”
- [CALCITE-1995]
Remove terms from
Filterif predicates indicate they are always true or false - [CALCITE-1983]
Push
=and<>operations with numeric cast on dimensions to Druid - [CALCITE-1960]
RelMdPredicates.getPredicatesis slow if there are many equivalent columns (Rheet Wong) - Make Travis CI builds work (Christian Beikov)
- [CALCITE-1987]
Implement
EXTRACTfor JDBC (Pavel Gubin) - [CALCITE-1988] Various code quality issues
- [CALCITE-1986]
Add
RelBuilder.matchand methods for building patterns (Dian Fu) - [CALCITE-1980]
RelBuilder.aggregateshould rename underlying fields ifgroupKeycontains an alias - [CALCITE-1946]
JDBC adapter should generate sub-
SELECTif dialect does not support nested aggregate functions (Pawel Ruchaj) - [CALCITE-1976] linq4j: support List and Map literals
Web site and documentation
- Update PMC Chair
- [CALCITE-2052] Remove SQL code style from materialized views documentation
- [CALCITE-2036] Fix “next” link in powered_by.html
- [CALCITE-2038] Fix incomplete sentence in tutorial
- [CALCITE-2021] Document the interfaces that you can use to extend Calcite
- Javadoc fixes (Alexey Roytman)
- Add two talks, and committer Christian Beikov
- Fix URL in
FileSchemaFactoryjavadoc (Marc Prud’hommeaux) - [CALCITE-1989] Check dependencies for vulnerabilities each release
1.14.0 / 2017-09-06
This release brings some big new features.
The GEOMETRY data type was added along with 35 associated functions as the start of support for Simple Feature Access.
There are also two new adapters.
Firstly, the Elasticsearch 5 adapter which now exists in parallel with the previous Elasticsearch 2 adapter.
Additionally there is now an OS adapter which exposes operating system metrics as relational tables.
ThetaSketch and HyperUnique support has also been added to the Druid adapter.
Several minor improvements are added as well including improved MATCH_RECOGNIZE support, quantified comparison predicates, and ARRAY and MULTISET support for UDFs.
A full list of new features is given below.
There are also a few breaking changes.
The return type of RANK and other aggregate functions has been changed.
There also changes to Aggregate in order to improve compatibility with Apache Hive.
Finally, the Schema#snapshot() interface has been upgraded to allow for more flexible versioning.
Compatibility: This release is tested
on Linux, macOS, Microsoft Windows;
using Oracle JDK 1.7, 1.8, 9;
Guava versions 14.0 to 21.0;
Druid version 0.11.0;
other software versions as specified in pom.xml.
New features
- [CALCITE-1968] OpenGIS Simple Feature Access SQL 1.2.1: add
GEOMETRYdata type and first 35 functions Add Spatial page, document GIS functions in SQL reference (indicating which ones are implemented), and add “countries” data set for testing. - [CALCITE-1967] Elasticsearch 5 adapter (Christian Beikov)
- [CALCITE-1911] In
MATCH_RECOGNIZE, supportWITHINsub-clause (Dian Fu) - [CALCITE-1897] Add ‘%’ operator as an alternative to ‘MOD’ (sunjincheng)
- [CALCITE-1787] Add
ThetaSketchandHyperUniquesupport to Calcite via rolled up columns (Zain Humayun) - [CALCITE-1896] OS adapter and
sqlsh- Vmstat table function for sqlsh
- [CALCITE-1864] Allow
NULLliteral as argument - [CALCITE-1834] Allow user-defined functions to have arguments that are
ARRAYorMULTISET(Ankit Singhal) - [CALCITE-1886] Support
"LIMIT [offset,] row_count", per MySQL (Kaiwang Chen) - [CALCITE-1845] Quantified comparison predicates (SOME, ANY, ALL)
- [CALCITE-1709] Support mixing table columns with extended columns in DML (Rajeshbabu Chintaguntla)
Bug-fixes, API changes and minor enhancements
- [CALCITE-1931]
Change the return type of
RANKand other aggregate functions. Various aggregate functions that used to returnINTEGERnow return other types:RANK,DENSE_RANK, andNTILEnow returnBIGINT;CUME_DISTandPERCENT_RANKnow returnDOUBLE. (This is a breaking change.) - [CALCITE-1947] Add
TIME/TIMESTAMPwith local time zone types to optimizer - [CALCITE-1972] Create
.sha512and.md5digests for release artifacts - [CALCITE-1941] Refine interface
Schema#snapshot()(This is a breaking change.) - [CALCITE-1069] In
Aggregate, deprecate indicators, and allowGROUPINGto be used as an aggregate function (This is a breaking change.) - [CALCITE-1969] Annotate user-defined functions as strict and semi-strict
- [CALCITE-1945] Make return types of
AVG,VARIANCE,STDDEVandCOVARcustomizable via RelDataTypeSystem - [CALCITE-1966] Allow normal views to act as materialization table (Christian Beikov)
- [CALCITE-1953] Rewrite
"NOT (x IS FALSE)" to "x IS NOT FALSE"; "x IS TRUE"would be wrong - [CALCITE-1943] Add back
NavigationExpanderandNavigationReplacerinSqlValidatorImpl(Dian Fu) - [CALCITE-1963] Upgrade checkstyle, and fix code to comply
- [CALCITE-1944] Window function applied to sub-query that returns dynamic star gets wrong plan (Volodymyr Vysotskyi)
- [CALCITE-1954] Column from outer join should be null, whether or not it is aliased
- [CALCITE-1959] Reduce the amount of metadata and
tableNamecalls in Druid (Zain Humayun) - [CALCITE-1930] Fix
AggregateExpandDistinctAggregatesRulewhen there are multipleAggregateCallsreferring to the same input - [CALCITE-1936] Allow
ROUND()andTRUNCATE()to take one operand, defaulting scale to 0 - [CALCITE-1931] Change the return type of RANK and other aggregate functions
- [CALCITE-1932]
Project.getPermutation()should return null if not a permutation (e.g. repeatedInputRef) - [CALCITE-1925] In
JaninoRelMetadataProvider, cache null values (Ted Xu) - [CALCITE-1849] Support
RexSubQueryinRelToSqlConverter - [CALCITE-1909] Output
rowTypeof Match should includePARTITION BYandORDER BYcolumns - [CALCITE-1929] Deprecate class
RelDataTypeFactory.FieldInfoBuilder - [CALCITE-1895] MSSQL’s SUBSTRING operator has different syntax (Chris Baynes)
- [CALCITE-1919]
NullPointerExceptionwhen target inReflectiveSchemabelongs to root package (Lim Chee Hau) - [CALCITE-1907] Table function with 1 column gives
ClassCastException - [CALCITE-1841] Create handlers for JDBC dialect-specific generated SQL (Chris Baynes)
- [CALCITE-1898]
LIKEmust match ‘.’ (period) literally - [CALCITE-1900] Detect cyclic views and give useful error message
- [CALCITE-1893] Add MYSQL_5 conformance
- [CALCITE-1883]
HepPlannershould force garbage collect whenever a root registered (Ted Xu) - [CALCITE-1889] Accept compound identifiers in
SqlValidatorUtil.checkIdentifierListForDuplicates()(Rajeshbabu Chintaguntla) - [CALCITE-1881] Can’t distinguish overloaded user-defined functions that have DATE and TIMESTAMP arguments (余启)
- [CALCITE-1803] Push Project that follows Aggregate down to Druid (Junxian Wu)
- [CALCITE-1828] Push the FILTER clause into Druid as a Filtered Aggregator (Zain Humayun)
- [CALCITE-1871] Nesting
LASTwithinPREVis not parsed correctly forMATCH_RECOGNIZE - [CALCITE-1877] Move the Pig test data files into target for the test runtime
- [CALCITE-1815] Switch Pig adapter to depend on avatica-core instead of full avatica
- [CALCITE-1826] Generate dialect-specific SQL for
FLOORoperator when in aGROUP BY(Chris Baynes) - [CALCITE-1842]
Sort.computeSelfCost()callsmakeCost()`` with arguments in wrong order (Junxian Wu) - [CALCITE-1874] In Frameworks, make
SqlToRelConverterconfigurable - [CALCITE-1873] In a “GROUP BY ordinal” query, validator gives invalid “Expression is not being grouped” error if column has alias
- [CALCITE-1833] User-defined aggregate functions with more than one parameter (hzyuemeng1)
- [CALCITE-1860] Duplicate null predicates cause
NullPointerExceptioninRexUtil(Ruidong Li) - [CALCITE-1859] NPE in validate method of
VolcanoPlanner - [CALCITE-1818] Handle
SqlKind.DYNAMIC(parameters) inSqlImplementor(Dylan Adams) - [CALCITE-1856] Add option
StructKind.PEEK_FIELDS_NO_EXPAND, similar toPEEK_FIELDSbut is not expanded in"SELECT *"(Shuyi Chen)
Web site and documentation
- Add committer Chris Baynes
- Add DataEngConf talk
- [CALCITE-1901] SQL reference should say that “ONLY” is required after “FETCH … ROWS”
1.13.0 / 2017-06-20
This release comes three months after 1.12.0. It includes more than 75 resolved issues, comprising a large number of new features as well as general improvements and bug-fixes.
First, Calcite has been upgraded to use Avatica 1.10.0, which was recently released.
Moreover, Calcite core includes improvements which aim at making it more powerful, stable and robust. In addition to numerous bux-fixes, we have implemented a new materialized view rewriting algorithm and new metadata providers which should prove useful for data processing systems relying on Calcite.
In this release, we have also completed the work to
support the MATCH_RECOGNIZE clause
used in complex-event processing (CEP).
In addition, more progress has been made for the different adapters. For instance, the Druid adapter now relies on Druid 0.10.0 and it can generate more efficient plans where most of the computation can be pushed to Druid, e.g., using extraction functions.
There is one minor but potentially breaking API change in [CALCITE-1788] (Simplify handling of position in the parser), requiring changes in the parameter lists of parser extension methods.
Compatibility: This release is tested
on Linux, macOS, Microsoft Windows;
using Oracle JDK 1.7, 1.8, 9;
Guava versions 14.0 to 21.0;
Druid version 0.10.0;
other software versions as specified in pom.xml.
New features
- [CALCITE-1570]
Add
MATCH_RECOGNIZEoperator, for event pattern-matching- [CALCITE-1647]
Classifier and
match_numbersyntax support forMATCH_RECOGNIZE - [CALCITE-1646]
Partition by and order by syntax support for
MATCH_RECOGNIZE(Zhiqiang-He) - [CALCITE-1645]
Row per match syntax support for
MATCH_RECOGNIZE(Zhiqiang-He) - [CALCITE-1644]
Subset clause syntax support for
MATCH_RECOGNIZE(Zhiqiang-He) - [CALCITE-1643]
AFTER MATCHsub-clause ofMATCH_RECOGNIZEclause (Zhiqiang-He) - [CALCITE-1642]
Support
MEASURESclause inMATCH_RECOGNIZE(Zhiqiang-He)
- [CALCITE-1647]
Classifier and
- [CALCITE-1853] Push Count distinct into Druid when approximate results are acceptable (Zain Humayun)
- [CALCITE-1829]
Add
TIME/TIMESTAMP/DATEdatatype handling toRexImplicationChecker - [CALCITE-1613]
Implement
EXTRACTfor time unitDOW,DOY; and fixCENTURY - [CALCITE-1807] Upgrade to Avatica 1.10
- [CALCITE-1802] Add post-aggregation step for Union in materialized view rewriting
- [CALCITE-1795]
Extend materialized view rewriting to produce rewritings using
Unionoperators - [CALCITE-1797] Support view partial rewriting in aggregate materialized view rewriting
- [CALCITE-1791] Support view partial rewriting in join materialized view rewriting
- [CALCITE-1731] Rewriting of queries using materialized views with joins and aggregates
- [CALCITE-1780]
Add
required OrderandrequiresOverparameters to the constructor ofSqlUserDefinedAggregate Function(SunJincheng) - [CALCITE-1306]
Allow
GROUP BYandHAVINGto referenceSELECTexpressions by ordinal and alias (Rajeshbabu Chintaguntla) - [CALCITE-1781]
Allow expression in
CUBEandROLLUP - [CALCITE-1771] Upgrade to Druid 0.10.0 (Nishant Bangarwa)
- [CALCITE-1772]
Add a hook to allow
RelNodeexpressions to be executed by JDBC driver - [CALCITE-1766] Support system functions having no args with parenthesis too (Ankit Singhal)
- [CALCITE-1760] Implement utility method to identify lossless casts
- [CALCITE-1682] New metadata providers for expression column origin and all predicates in plan
- [CALCITE-1753] Push expressions into null-generating side of a join if they are “strong” (null-preserving)
- [CALCITE-1759] Add SQL:2014 reserved words to parser
- [CALCITE-476] Support distinct aggregates in window functions
- [CALCITE-1738]
Support
CASTof literal values in filters pushed to Druid (Remus Rusanu) - [CALCITE-1758]
Push to Druid
OrderBy/Limitoperation over time dimension and additional columns (Slim Bouguerra) - [CALCITE-1707]
Push
Extractionfilter onYear/Month/Dayto druid (Slim Bouguerra) - [CALCITE-1725] Push project aggregate of time extract to druid (Slim Bouguerra)
- [CALCITE-1747]
RelMdColumnUniquenessforHepRelVertex - [CALCITE-1749] Push filter conditions partially into Druid
- [CALCITE-1730] Upgrade Druid to 0.9.2 (Nishant Bangarwa)
- [CALCITE-1702] Support extended columns in DML (Kevin Liew)
Bug-fixes, API changes and minor enhancements
- [CALCITE-1855] Fix float values in Cassandra adapter
- [CALCITE-1848] Rename MySource to FileSource (Darion Yaphet)
- [CALCITE-1852]
Fix for
UnionMergeRuleto deal correctly withEXCEPT - [CALCITE-1850]
Extend
UnionMergeRuleto deal with more than 2 branches (Pengcheng Xiong) - [CALCITE-1805]
Druid adapter incorrectly pushes down
COUNT(c); Druid only supportsCOUNT(*) - [CALCITE-1846] Metadata pulled up predicates should skip non-deterministic calls (Ted Xu)
- [CALCITE-1819]
Druid Adapter does not push the boolean operator
<>as a filter correctly (Zain Humayun) - [CALCITE-1798]
In JDBC adapter, generate dialect-specific SQL for
FLOORoperator (Chris Baynes) - [CALCITE-1812]
Provide
RelMetadataQueryfrom planner to rules and invalidate intransformTo(Remus Rusanu) - [CALCITE-1804]
Cannot assign
NOT NULLarray toNULLABLEarray (Ankit Singhal) - [CALCITE-1810]
Allow
NULLforARRAYconstructor (Ankit Singhal) - [CALCITE-1830]
ProcessBuilderis security sensitive; move it to test suite to prevent accidents - [CALCITE-1816]
JaninoRelMetadataProvidergenerated classes leak ACTIVE nodes on exception (Remus Rusanu) - [CALCITE-1690]
Calcite timestamp literals cannot express precision above millisecond,
TIMESTAMP(3) - [CALCITE-1664]
CAST(<string> as TIMESTAMP)adds part of sub-second fraction to the value - [CALCITE-1742] Create a read-consistent view of CalciteSchema for each statement compilation
- [CALCITE-1800]
JDBC adapter fails on query with
UNIONinFROMclause (Viktor Batytskyi, Minji Kim) - [CALCITE-1788] Simplify handling of position in the parser
- [CALCITE-1782]
AggregateExpandDistinctAggregatesRuleshould work onAggregateinstead ofLogicalAggregate(Haohui Mai) - [CALCITE-1293]
Bad code generated when argument to
COUNT(DISTINCT)is aGROUP BYcolumn - [CALCITE-1770]
CAST(NULL AS ...)gives NPE (Slim Bouguerra) - [CALCITE-1777]
WHERE FALSEcausesAssertionError(Slim Bouguerra) - [CALCITE-1778]
Query with
WHERE CASEthrowsAssertionError“Cast for just nullability not allowed” - [CALCITE-1773]
Add Test sql validator test for Pattern skip syntax in
MATCH_RECOGNIZE(Zhiqiang-He) - [CALCITE-1761]
TUMBLE/HOP/SESSION_START/ENDdo not resolve time field correctly - [CALCITE-1765] Druid adapter fail when the extract granularity is not supported (Slim Bouguerra)
- [CALCITE-1767] Fix join/aggregate rewriting rule when same table is referenced more than once
- [CALCITE-1764] Adding sort ordering type for druid sort json field (Slim Bouguerra)
- [CALCITE-715]
Add
PERIODtype constructor and period operators (CONTAINS,PRECEDES, etc.) - [CALCITE-1456]
Change
SubstitutionVisitorto use genericRelBuilderinstead of Logical instances of the operators when possible - [CALCITE-1763] Recognize lossless casts in join/aggregate materialized view rewriting rule
- [CALCITE-1639]
TIMESTAMPADD(MONTH, ...)should return last day of month if the day overflows - [CALCITE-1754]
In Csv adapter, convert
DATEandTIMEvalues toint, andTIMESTAMPvalues tolong(Hongbin Ma) - [CALCITE-1751]
PigRelBuilderStyleTesttest cases are flapping - [CALCITE-1750] Fix unit test failures when the path to the repository contains spaces
- [CALCITE-1724] Wrong comparison for floats/double type in Druid (Slim Bouguerra)
- [CALCITE-1734] Select query result not parsed correctly with druid 0.9.2 (Nishant Bangarwa)
- [CALCITE-1732]
IndexOutOfBoundsExceptionwhen usingLATERAL TABLEwith more than one field (Godfrey He) - [CALCITE-1722]
Druid adapter uses un-scaled value of
DECIMALliterals (Slim Bouguerra) - [CALCITE-1723]
Match
DruidProjectFilterTransposeRuleagainstDruidQuery(Nishant Bangarwa) - [CALCITE-1714] Do not push group by on druid metrics fields (Slim Bouguerra)
Web site and documentation
- Michael Mior joins PMC
- Add 3 new committers (Zhiqiang-He, Kevin Liew, Slim Bouguerra)
- [CALCITE-1854] Fix value range of TINYINT in documentation (James Xu)
- [CALCITE-1827]
Document
TIMESTAMPADD,TIMESTAMPDIFFfunctions (SunJincheng) - [CALCITE-1796] Update materialized views documentation
- [CALCITE-1566] Better documentation on the use of materialized views
1.12.0 / 2017-03-24
Features of note this release are
JDK 9 support,
the new file/web and Apache Pig adapters,
general improvements to the Druid adapter,
more helpful error messages if you get a table or column name wrong,
improved the plans for correlated sub-queries,
support for TUMBLE, HOP and SESSION window functions in streaming and regular queries,
experimental support for MATCH_RECOGNIZE clause for complex-event processing (CEP),
several new built-in functions to comply with the ODBC/JDBC standard.
Compatibility: This release is tested
on Linux, macOS, Microsoft Windows;
using Oracle JDK 1.7, 1.8, 9;
Guava versions 14.0 to 21.0;
Druid version 0.9.1.1;
other software versions as specified in pom.xml.
New features
- [CALCITE-1666] Support for modifiable views with extended columns (Kevin Liew)
- [CALCITE-1655]
Druid adapter: add
INfilter (Slim Bouguerra) - [CALCITE-1641]
Add parser and validator support for
MATCH_RECOGNIZE, a new clause for complex-event processing (CEP) (Zhiqiang-He)- [CALCITE-1686]
Only allow
FINALand other functions insideMATCH_RECOGNIZE(Zhiqiang-He) - [CALCITE-1689]
Remove
PATTERN_DEFINE_ASin SqlStdOperatorTable;MATCH_RECOGNIZEnow usesAS(Zhiqiang-He)
- [CALCITE-1686]
Only allow
- [CALCITE-1668]
Simplify
1 = 1toTRUE,1 > 2toFALSE(Kevin Risden) - [CALCITE-1598] Pig adapter (Eli Levine)
- [CALCITE-1661]
Druid adapter: Support aggregation functions on
DECIMALcolumns - [CALCITE-1615]
Support
HOPandSESSIONfunctions in theGROUP BYclause (Julian Hyde and Haohui Mai) - [CALCITE-1494] More efficient plan for correlated sub-queries, omitting value-generating scans where possible
- [CALCITE-1638]
Simplify
$x = $xto$x is not null - [CALCITE-884]
File adapter (Henry Olson)
- [CALCITE-1704]
Execute queries on CSV files using simple
sqllinecommand - [CALCITE-1676] Scan directory for .csv, .json and .gz files
- Allow multiple Calcite columns to be derived from one HTML column, e.g. Location → Lat, Lon
- Improved pattern match: added
matchSeqto allow selection of nth match - Add replace patterns to cell parsing logic
- Add handling for tables without
<TH>elements - Unit tests using local files (URL tests are contingent on network access)
- Ability to parse HTML, CSV and JSON from local files
- Combine the optiq-web project with code from the CSV adapter
- [CALCITE-1704]
Execute queries on CSV files using simple
- [CALCITE-1652]
Allow
GROUPINGfunction to have multiple arguments, likeGROUPING_ID - [CALCITE-1634]
Make
RelBuilder.distinctno-op if input is already distinct; use it inRelDecorrelator - [CALCITE-1635]
Add
MinRowCountmetadata - [CALCITE-1628]
Add an alternative match pattern for
SemiJoinRule - [CALCITE-1618]
SortProjectTransposeRuleshould check for monotonicity preservingCAST - [CALCITE-1510]
In
INSERT/UPSERTwithout an explicit target column list, allow fewer source columns than table (Kevin Liew)- Check for default value only when target field is null (Rajeshbabu Chintaguntla)
- [CALCITE-1603]
Support
TUMBLEwindow function in theGROUP BYclause (Julian Hyde and Haohui Mai) - [CALCITE-1606] Add datetime scalar functions (Laurent Goujon)
- [CALCITE-1604]
Add JDBC/ODBC scalar functions
DATABASE,IFNULL,USER(Laurent Goujon) - [CALCITE-1549] More helpful error message when schema, table or column not found
- [CALCITE-420]
Add
REPLACEfunction, callable with and without JDBC escape syntax (Riccardo Tommasini) - [CALCITE-1557] Add numeric scalar functions (Laurent Goujon)
- [CALCITE-1258] JDK9
Bug-fixes, API changes and minor enhancements
- [CALCITE-1716] Fix Cassandra integration tests
- [CALCITE-1715] Downgrade to Guava 19.0 to fix Cassandra incompatibility
- [CALCITE-1706]
Disable
DruidAggregateFilterTransposeRule, because it causes fine-grained aggregations to be pushed to Druid - [CALCITE-1695]
Add class
RexSimplify, providing an explicitRexExecutorfor methods to simplifyRexNodes - [CALCITE-1694] Pig adapter: Use the shaded Avatica dependency instead
- [CALCITE-1561]
Make
PigTestcluster aware of data files; hopefully this will prevent intermittent test failures (Eli Levine) - [CALCITE-1696]
Support
RexLocalRefforEXPLAIN PLAN AS JSON - [CALCITE-1683]
Druid-specific rules to transpose
Filterwith other relations (Nishant Bangarwa) - [CALCITE-1684]
Change default precision of
VARCHARandVARBINARYtypes from 1 to “unspecified” (Kevin Liew) - [CALCITE-1691]
ClassCastExceptioninRelOptUtil.containsNullableFields, attempting to convert executor toRexExecutorImpl - [CALCITE-1688]
Infinite loop during materialization substitution if query contains
Union,MinusorIntersect - [CALCITE-1665]
HAVINGsupport inRelToSqlConverter(Zhiqiang He) - [CALCITE-1673]
In CSV adapter, query with
ORDER BYorGROUP BYonTIMESTAMPcolumn throws CompileException (Gangadhar Kairi) - [CALCITE-1674]
LIKEdoes not match value that contains newline (Mark Payne) - [CALCITE-1675]
Two-level column name cannot be resolved in
ORDER BY - [CALCITE-1667] Forbid calls to JDK APIs that use the default locale, time zone or character set
- [CALCITE-1656]
Improve cost function in
DruidQueryto encourage early column pruning (Nishant Bangarwa) - [CALCITE-1664]
CAST('<string>' as TIMESTAMP)wrongly adds part of sub-second fraction to the value - [CALCITE-1659]
Simplifying
CAST('YYYY-MM-DD hh:mm:ss.SSS' as TIMESTAMP)should round the sub-second fraction (Remus Rusanu) - [CALCITE-1439] Handle errors during constant reduction
- [CALCITE-1653]
Pass an expression executor to
RexUtil.simplifyfor constant reduction (Remus Rusanu) - [CALCITE-1601]
DateRangeRulesloses OR filters - [CALCITE-1637]
Add mutable equivalents for all relational expressions (e.g.
MutableFilter) - [CALCITE-1621]
Add a cast around the NULL literal in aggregate rules (Anton Mushin)
- Add
RexBuilder.makeNullLiteral(RelDataType)
- Add
- [CALCITE-1649]
Data type mismatch in
EnumerableMergeJoin - [CALCITE-1636] JDBC adapter generates wrong SQL for self join with sub-query (Zhiqiang-He)
- [CALCITE-1633]
In plans, output
Correlate.joinTypeattribute in lower-case, same asJoin.joinType - [CALCITE-1632] Return type of “datetime + interval” expression
- [CALCITE-365]
AssertionErrorwhile translating query withWITHand correlated sub-query - [CALCITE-1623]
Make sure
DATE,TIMEandTIMESTAMPliterals haveCalendarwith GMT timezone - [CALCITE-1619]
CASTis ignored by rules pushing operators intoDruidQuery - [CALCITE-1617] Druid adapter: Send timestamp literals to Druid as local time, not UTC
- [CALCITE-1500]
Decouple materialization and lattice substitution from
VolcanoPlanner - [CALCITE-1589]
Druid adapter:
timeseriesquery shows all days, even if no data - [CALCITE-1572]
JdbcSchemathrows exception when detecting nullable columns (Wu Xiang) - [CALCITE-1610]
RelBuildersort-combining optimization treats aliases incorrectly (Jess Balint) - [CALCITE-1595]
RelBuilder.callthrowsNullPointerExceptionif argument types are invalid (Jess Balint) - [CALCITE-1602] Remove uses of deprecated APIs
- [CALCITE-1569]
Code generation for fields of type
java.sql.Date(Zhen Wang) - [CALCITE-1582]
RelToSqlConverterdoesn’t handle cartesian join (Jess Balint) - [CALCITE-1597]
Obsolete
Util.newInternal,.pre,.post,.permAssertandThrowables.propagate - [CALCITE-1586]
JDBC adapter generates wrong SQL if
UNIONhas more than two inputs (Zhiqiang He) - [CALCITE-1535]
Give error if column referenced in
ORDER BYis ambiguous (Zhen Wang) - [CALCITE-1594]
ConventionTraitDef.getConversionData()is not thread-safe - [CALCITE-1577] Druid adapter: Incorrect result - limit on timestamp disappears
- [CALCITE-1587]
Druid adapter:
topNquery returns approximate results - [CALCITE-1578]
Druid adapter: wrong semantics of
topNquery limit with granularity - Druid adapter: Add
enum Granularity - [CALCITE-1592]
SqlToRelConverterthrowsUnsupportedOperationExceptionif query hasNOT ... NOT IN - [CALCITE-1590] Support Guava version 21.0
- [CALCITE-1575] Literals may lose precision during expression reduction
- [CALCITE-1546]
Wrong plan for
NOT INsub-queries with disjunction - [CALCITE-1574] Memory leak in maven
- [CALCITE-1571]
Could not resolve view with
SimpleCalciteSchema - [CALCITE-1558]
AggregateExpandDistinctAggregatesRulegets field mapping wrong if group key is used in aggregate function (Zhenghua Gao) - [CALCITE-1562] Update jsr305 from 1.3.9 to 3.0.1
- [CALCITE-1563] In case-insensitive connection, non-existent tables use alphabetically preceding table
- [CALCITE-1544]
AggregateJoinTransposeRulefails to preserve row type (Kurt Young) - [CALCITE-1543]
Correlated scalar sub-query with multiple aggregates gives
AssertionError(Kurt Young)
Web site and documentation
- Maryann Xue joins PMC
- Add 3 new committers (Gian Merlino, Jess Balint, Laurent Goujon)
- [CALCITE-1657] Release Calcite 1.12.0
- [CALCITE-1677] Replace duplicate avatica docs with a redirect
- [CALCITE-1685]
Site:
defaultNullCollationkey listed asmaterializationsEnabled(Kevin Liew) - Add MapD to Powered by Calcite page (Todd Mostak)
- Diagram of logos of projects and products powered by Calcite
- [CALCITE-1622] Bugs in website example code (Damjan Jovanovic)
1.11.0 / 2017-01-09
Nearly three months after the previous release, there is a long list of improvements and bug-fixes, many of them making planner rules smarter.
Several adapters have improvements:
- The JDBC adapter can now push down DML (
INSERT,UPDATE,DELETE), windowed aggregates (OVER),IS NULLandIS NOT NULLoperators. - The Cassandra adapter now supports authentication.
- Several key bug-fixes in the Druid adapter.
For correlated and uncorrelated sub-queries, we generate more efficient plans (for example, in some correlated queries we no longer require a sub-query to generate the values of the correlating variable), can now handle multiple correlations, and have also fixed a few correctness bugs.
New SQL syntax:
-
CROSS APPLYandOUTER APPLY; -
MINUSas a synonym forEXCEPT; - an
AS JSONoption for theEXPLAINcommand; - compound identifiers in the target list of
INSERT, allowing you to insert into individual fields of record-valued columns (or column families if you are using the Apache Phoenix adapter).
A variety of new and extended built-in functions: CONVERT, LTRIM,
RTRIM, 3-parameter LOCATE and POSITION, RAND, RAND_INTEGER,
and SUBSTRING applied to binary types.
There are minor but potentially breaking API changes in
[CALCITE-1519]
(interface SubqueryConverter becomes SubQueryConverter and some
similar changes in the case of classes and methods) and
[CALCITE-1530]
(rename Shuttle to Visitor, and create a new class Visitor<R>).
See the cases for more details.
Compatibility: This release is tested
on Linux, macOS, Microsoft Windows;
using Oracle JDK 1.7, 1.8;
Guava versions 14.0 to 19.0;
Druid version 0.9.1.1;
other software versions as specified in pom.xml.
New features
- [CALCITE-1551]
Preserve alias in
RelBuilder.project(Jess Balint) - [CALCITE-1552]
Add
RANDfunction, returningDOUBLEvalues in the range 0..1 - [CALCITE-1414]
Add
RAND_INTEGERfunction, which returns a random integer modulo N (Julian Feinauer) - [CALCITE-1540]
Support multiple columns in
PARTITION BYclause of window function (Hongbin Ma) - [CALCITE-1534]
Allow compound identifiers in
INSERTtarget column list - [CALCITE-1529]
Support
CREATE TABLEin tests (and only in tests) - [CALCITE-1527] Support DML in the JDBC adapter (Christian Tzolov)
- [CALCITE-1523]
In
RelBuilder, addfieldmethod to reference input to join by alias (Jess Balint) - [CALCITE-1524] Add a project to the planner root so that rules know which output fields are used
- [CALCITE-1425]
Support two-level column structure in
INSERT/UPDATE/MERGE - [CALCITE-1472]
Support
CROSS/OUTER APPLYsyntax (Jark Wu) - [CALCITE-1506]
Push
OVERclause to underlying SQL via JDBC adapter (Christian Tzolov) - [CALCITE-1509] Allow overriding the convertlet table in CalcitePrepareImpl (Gian Merlino)
- [CALCITE-1483]
Generate simpler logic for
NOT INif we can deduce that the key is never null - [CALCITE-1497]
Infer
IS NOT NULL, and project predicates - [CALCITE-1489]
Add rule,
AggregateValuesRule, that applies to anAggregateon an empty relation (Gian Merlino) - [CALCITE-1447]
Implement
INTERSECT DISTINCTby rewriting toUNION ALLand counting (Pengcheng Xiong) - [CALCITE-1389] Add a rewrite rule to use materialized views with joins
- [CALCITE-1125]
MINUSas a synonym forEXCEPT(enabled in Oracle10 conformance) (Chandni Singh) - [CALCITE-1453]
Support
ANYtype with binary comparison and arithmetic operators (Jungtaek Lim) - [CALCITE-1444]
Add
CONVERTfunction (Laurent Goujon) - [CALCITE-1448]
Add rules to flatten and prune
IntersectandMinus; flatten set-operators if the top isDISTINCTand bottom isALL - [CALCITE-1426]
Support customized star expansion in
Table - [CALCITE-1454]
Allow custom implementations of
SqlConformance - [CALCITE-1417]
In
RelBuilder, simplify “CAST(literal TO type)” to a literal when possible - [CALCITE-1443] Add authentication support in Cassandra adapter
- [CALCITE-1404]
Implement
FILTERon aggregate functions inInterpreter - [CALCITE-1418]
Implement
SUBSTRINGfunction forBINARYandVARBINARY(Jungtaek Lim) - [CALCITE-1422]
In JDBC adapter, allow
IS NULLandIS NOT NULLoperators in generated SQL join condition (Viktor Batytskyi) - [CALCITE-1419]
Implement JDBC functions:
LTRIM,RTRIMand 3-parameterLOCATEandPOSITION(Jungtaek Lim) - [CALCITE-917]
Add
AS JSONas output option forEXPLAIN
Bug-fixes, API changes and minor enhancements
- [CALCITE-1559] Convert example models to stricter JSON
- [CALCITE-1560]
Remove
avaticadirectory fromsqlline’s class path - Remove non-ASCII characters from Java source files
- [CALCITE-1511]
Decorrelation fails if query has more than one
EXISTSinWHEREclause - [CALCITE-1555]
Improve
RelNodevalidation - [CALCITE-1548] Instantiate function objects once per query
- Add lock to
JdbcAdapterTest, to ensure that tests that modify data run in series - [CALCITE-1519] Standardize on “sub-query” rather than “subquery” in class names and comments
- [CALCITE-1493]
Wrong plan for
NOT INcorrelated queries - [CALCITE-1526]
Use
Strongto infer whether a predicate’s inputs may be null - [CALCITE-1530]
Create a visitor to traverse linq4j expressions without mutating them, and
rename
VisitortoShuttle - [CALCITE-1507]
OFFSETcannot be pushed through aJOINif the non-preserved side of outer join is not count-preserving - [CALCITE-1522]
Fix error message for
SetOpwith incompatible args (Jess Balint) - [CALCITE-1532]
In
HttpUtils, don’t log HTTP requests; they may contain user name, password - [CALCITE-1037]
Column uniqueness is calculated incorrectly for
Correlate(Alexey Makhmutov) - [CALCITE-1495]
SemiJoinRuleshould not apply toRIGHTandFULL JOIN, and should stripLEFT JOIN - [CALCITE-1516]
Upgrade
hydromatic-resource-maven-plugin, and re-workSaffronProperties - [CALCITE-1498]
Avoid
LIMITwith trivialORDER BYbeing pushed throughJOINendlessly - [CALCITE-1501]
EnumerableUnionshould use array comparator when row format isARRAY(Dayue Gao) - [CALCITE-1502]
AssertionErrorinReduceExpressionsRulewhenCASEis used with optional value and literal (Serhii Harnyk) - Cosmetic changes, and deprecate some methods
- [CALCITE-1486] Invalid “Invalid literal” error for complex expression
- [CALCITE-1488]
ValuesReduceRuleshould ignore emptyValues - [CALCITE-1384]
Extension point for
ALTERstatements (Gabriel Reid) - [CALCITE-1484] Upgrade Apache parent POM to version 18
- [CALCITE-1482] Fix leak on CassandraSchema creation
- [CALCITE-1479]
AssertionErrorinReduceExpressionsRuleon multi-columnINsub-query (Gian Merlino) - Upgrade
Quidem - [CALCITE-1416]
Make classes implement
AutoCloseablewhere possible (Chinmay Kolhatkar) - [CALCITE-1474]
Upgrade
aggdesigner - [CALCITE-1270]
Upgrade to
avatica-1.9,sqlline-1.2.0 - [CALCITE-1461]
Hard-coded class name in
JaninoRelMetadataProviderbreaks shading (Jark Wu) - [CALCITE-1465]
Store constants as a derived field in
RelOptPredicateList - [CALCITE-1429]
Druid adapter must send
fromNextwhen requesting rows from Druid (Jiarong Wei) - [CALCITE-1430]
In Druid adapter,
pagingIdentifiersmight have more than one value (Jiarong Wei) - [CALCITE-1442] Interval fractional second precision returns wrong value (Laurent Goujon)
- [CALCITE-1434] User-defined aggregate function that uses a generic interface (Arun Mahadevan)
- [CALCITE-1431]
RelDataTypeFactoryImpl.copyType()did not copyStructKind - [CALCITE-1424]
Druid type is called
FLOAT, notDOUBLE(Jiarong Wei) - [CALCITE-1415] Add sub-query support for RelStructuredTypeFlattener
Web site and documentation
- Change PMC chair
- [CALCITE-1459] Add Apache Apex to “Powered By” page (Chinmay Kolhatkar)
1.10.0 / 2016-10-12
This release comes shortly after 1.9.0. It includes mainly bug-fixes for the core and Druid adapter. For the latest, we fixed an important issue that prevented us from handling consistently time dimensions in different time zones.
Compatibility: This release is tested
on Linux, Mac OS X, Microsoft Windows;
using Oracle JDK 1.7, 1.8;
Guava versions 14.0 to 19.0;
Druid version 0.9.1.1;
other software versions as specified in pom.xml.
New feature
- [CALCITE-1374]
Support operator
!=as an alternative to<>
Bug-fixes, API changes and minor enhancements
- [CALCITE-1378]
ArrayIndexOutOfBoundsExceptionin sql-to-rel conversion for two-level columns - [CALCITE-1379]
When expanding
STAR, expand sub-fields inRecordTypecolumns ofStructKind.PEEK_FIELDSandStructKind.PEEK_FIELDS_DEFAULT - [CALCITE-1381] Function quantifier should be retained in a cloned Sql call (zhengdong)
- [CALCITE-1386]
ITEMoperator ignores the value type of the collection, assigns to Object variable (Jungtaek Lim) - [CALCITE-1392] Druid default time column not properly recognized
- [CALCITE-1394]
Using
CoreMatchers.containsStringcauses javadoc errors - [CALCITE-1396]
isDeterministiconly explores topRexCall - [CALCITE-1397]
ClassCastExceptioninFilterReduceExpressionsRule - [CALCITE-1398]
Change visibility of
RelFieldTrimmerutility methods - [CALCITE-1400]
AggregatePullUpConstantsRulemight adjust aggregation function parameters indices wrongly - [CALCITE-1402] Druid Filter translation incorrect if input reference is in RHS of comparison
- [CALCITE-1403]
DruidAdapterITbroken - [CALCITE-1420] Allow Calcite JDBC Driver minor version to be greater than 9
Web site and documentation
- [CALCITE-1393]
Exclude packages
org.apache.calcite.benchmarks.generated,org.openjdk.jmhfrom javadoc
1.9.0 / 2016-09-22
This release includes extensions and fixes for the Druid adapter. New features were added, such as the capability to recognize and translate Timeseries and TopN Druid queries. Moreover, this release contains multiple bug-fixes over the initial implementation of the adapter. It is worth mentioning that most of these fixes were contributed by Druid developers, which demonstrates the good reception of the adapter by that community.
We have added new SQL features too, e.g.,
support for LATERAL TABLE.
There are multiple interesting extensions to the planner rules that should contribute to
obtain better plans, such as
avoiding doing the same join twice
in the presence of COUNT DISTINCT, or being able to
simplify the expressions
in the plan further. In addition, we implemented a rule to
convert predicates on EXTRACT function calls into date ranges.
The rule is not specific to Druid; however, in principle, it will be useful to identify
filter conditions on the time dimension of Druid data sources.
Finally, the release includes more than thirty bug-fixes, minor enhancements and internal changes to planner rules and APIs.
Compatibility: This release is tested
on Linux, Mac OS X, Microsoft Windows;
using Oracle JDK 1.7, 1.8;
Guava versions 14.0 to 19.0;
other software versions as specified in pom.xml.
New features
- [CALCITE-1208] Improve two-level column structure handling
- [CALCITE-1227] Add streaming CSV table (Zhen Wang)
- [CALCITE-1309]
Support
LATERAL TABLE(Jark Wu)
Druid adapter
- [CALCITE-1292] Druid metadata query is very slow (Michael Spector)
- [CALCITE-1324] Druid metadata query throws exception if there are non-standard aggregators (Martin Karlsch)
- [CALCITE-1343] Broken Druid query
- [CALCITE-1348]
In Druid adapter, adjust how
SegmentMetadataQueryis used to detect types (Gian Merlino) - [CALCITE-1357]
Recognize Druid
TimeseriesandTopNqueries inDruidQuery - [CALCITE-1358] Push filters on time dimension to Druid
Planner rules
- [CALCITE-1220] Further extend simplify for reducing expressions
- [CALCITE-1288] Avoid doing the same join twice if count(distinct) exists (Gautam Parai)
- [CALCITE-1289]
RexUtil.simplifyCase()should account for nullability - [CALCITE-1290] When converting to CNF, fail if the expression size exceeds a threshold
- [CALCITE-1334]
Convert predicates on
EXTRACTfunction calls into date ranges - [CALCITE-1342]
ProjectPushershould use rel factories when creating new rels, e.g. project/filter - [CALCITE-1365]
Introduce
UnionPullUpConstantsRule
Bug-fixes, API changes and minor enhancements
- [CALCITE-30]
Implement
Statement.cancelmethod - [CALCITE-308]
Wrong result when using
DATE+INTERVALarithmetics - [CALCITE-319] Table aliases should follow case-sensitivity policy
- [CALCITE-528] Creating output row type of a Join does not obey case-sensitivity flags
- [CALCITE-991]
Create separate
SqlFunctionCategoryvalues for table functions and macros (Julien Le Dem) - [CALCITE-1043]
RexOptUtildoes not support function table other thanSqlStdOperatorTable - [CALCITE-1095]
NOTprecedence - [CALCITE-1148]
Trait conversion broken for
RelTraitsother thanConvention - [CALCITE-1278]
CalciteSignature’s ColumnMetaData for
DELETEshould be same asINSERT - [CALCITE-1283]
Nullability incorrectly assigned in
SqlTypeFactory.leastRestrictiveSqlType() - [CALCITE-1284]
Move
Quidemtests fromJdbcTestinto their own class - [CALCITE-1297]
RelBuildershould rename fields without creating an identity Project (Jark Wu) - [CALCITE-1302]
Create
SqlTypeNamevalues for each interval range, e.g.YEAR_MONTH - [CALCITE-1305]
Case-insensitive table aliases and
GROUP BY - [CALCITE-1310]
Infer type of arguments to
BETWEENoperator (Yiming Liu) - [CALCITE-1312]
Return type of
TIMESTAMP_ADDapplied to aDATEshould beTIMESTAMPif unit is smaller thanDAY - [CALCITE-1313]
Validator should derive type of expression in
ORDER BY - [CALCITE-1314]
Intermittent failure in
SqlParserTest.testGenerateKeyWords - [CALCITE-1321] In-list to join optimization should have configurable in-list size (Gautam Parai)
- [CALCITE-1327] Nested aggregate windowed query fails (Gautam Parai)
- [CALCITE-1330] DB2 does not support character sets in data type
- [CALCITE-1332]
JDBC adapter for DB2 should always use aliases for tables:
x.y.z AS z - [CALCITE-1333]
AggFunctionssupported byJdbcAggregateshould depend onSqlKind, instead of operator instance - [CALCITE-1336]
Add view name to the
ViewExpander(Julien Le Dem) - [CALCITE-1337]
Lazy evaluate
RexCalldigests (Ted Xu) - [CALCITE-1340] Window aggregates invalid error/error messages in some cases (Gautam Parai)
- [CALCITE-1344]
Incorrect inferred precision when
BigDecimalvalue is less than 1 - [CALCITE-1346] Invalid nested window aggregate query with alias (Gautam Parai)
- [CALCITE-1360]
Custom schema in file in current directory gives
NullPointerException - [CALCITE-1366]
Metadata provider should not pull predicates up through
GROUP BY - [CALCITE-1370]
In
SqlKind, addOTHER_DDLtoDDLenum set (Rajeshbabu Chintaguntla) - [CALCITE-1372] Calcite generate wrong field names in JDBC adapter
Web site and documentation
- [CALCITE-1229] Restore API and Test API links to site
- [CALCITE-1325] Druid adapter requires Guava 14.0 or higher
- [CALCITE-1329] As part of release, generate a file containing multiple digests
1.8.0 / 2016-06-13
This release adds adapters for Elasticsearch and Druid. It is also now easier to make a JDBC connection based upon a single adapter.
There are several new SQL features: UNNEST with
multiple arguments,
MAP arguments
and with a JOIN;
a DESCRIBE statement;
and a TRANSLATE
function like the one in Oracle and Postgres.
We also added support for
SELECT without FROM
(equivalent to the VALUES clause, and widely used in MySQL and Postgres),
and added a
conformance
parameter to allow you to selectively enable this and other SQL features.
And a couple of dozen bug-fixes and enhancements to planner rules and APIs.
Compatibility: This release is tested
on Linux, Mac OS X, Microsoft Windows;
using Oracle JDK 1.7, 1.8;
Guava versions 14.0 to 19.0;
other software versions as specified in pom.xml.
New features
- [CALCITE-1177]
Extend list of supported time units in
EXTRACT,CEILandFLOORfunctions (Venki Korukanti) - [CALCITE-1259] Allow connecting to a single schema without writing a model
- [CALCITE-750] Support aggregates within windowed aggregates (Gautam Parai)
- [CALCITE-1250]
UNNESTapplied toMAPdata type (Johannes Schulte) - [CALCITE-1253] Elasticsearch adapter (Subhobrata Dey)
- [CALCITE-1228]
Bind parameters in
INSERT - [CALCITE-1120]
SELECTwithoutFROM(Jimmy Xiang) - [CALCITE-855]
UNNESTwith multiple arguments - [CALCITE-1225]
UNNESTwithJOIN - [CALCITE-1115]
Add
TRANSLATEfunction with 3 parameters, like the one in Oracle (Javanshir Yelchiyev) - [CALCITE-1168]
Add
DESCRIBEstatement (Arina Ielchiieva) - [CALCITE-1121]
Druid adapter
- [CALCITE-1276] In Druid adapter, deduce tables and columns if not specified
- [CALCITE-1207] Allow numeric connection properties, and ‘K’, ‘M’, ‘G’ suffixes
Planner rules
- [CALCITE-1235]
Fully push down
LIMIT+OFFSETin Cassandra - [CALCITE-1216]
Rule to convert
Filter-on-Scanto materialized view (Amogh Margoor) - [CALCITE-1200]
Extend
RelOptUtil.splitJoinConditionto handleIS NOT DISTINCT FROM(Venki Korukanti) - [CALCITE-1211]
Allow free use of
CassandraSortforLIMIT - [CALCITE-1210] Allow UUID filtering in Cassandra
- [CALCITE-1182]
Add
ProjectRemoveRuleto pre-processing program of materialization substitution
Bug-fixes, API changes and minor enhancements
- [CALCITE-1281]
Druid adapter wrongly returns all numeric values as
intorfloat - [CALCITE-1279]
Druid “select” query gives
ClassCastException - [CALCITE-1277]
Rat fails on source distribution due to
git.properties - Update KEYS
- [CALCITE-1252]
Handle
ANYtype inRexBuilder.ensureTypeandTypeFactory.leastRestrictive(Mehand Baid, Minji Kim) - [CALCITE-1151]
Fix
SqlSetOptionto correctly handleSqlOperator.createCall(Sudheesh Katkam, Minji Kim) - [CALCITE-1106]
Expose constructor for
ProjectJoinTransposeRule(Minji Kim) - [CALCITE-1107]
Make
SqlSumEmptyIsZeroAggFunctionconstructor public (Minji Kim) - [CALCITE-1269]
Replace
IntListwith GuavaIntsclass - [CALCITE-1239] Upgrade to avatica-1.8.0
- [CALCITE-1266]
RelBuilder.fieldgets offsets wrong - [CALCITE-1264]
Litmusargument interpolation (Chris Baynes) - [CALCITE-1245]
Allow
RelBuilder.scanto take qualified table name (Chris Baynes) - Move code from
EnumerablestoEnumerableDefaults - [CALCITE-1246]
Cleanup duplicate variables in
JoinPushThroughJoinRule(Yi Xinglu) - [CALCITE-1241]
Add a Freemarker variable for adding non reserved keyword list to
Parser.jjtemplate (Venki Korukanti)- Create a table in
SqlParserTestof reserved keywords from various versions of the SQL standard
- Create a table in
- [CALCITE-1150] Add dynamic record type and dynamic star for schema-on-read table
- [CALCITE-1238]
Unparsing a query with
LIMITbut noORDER BYgives invalid SQL (Emmanuel Bastien) - [CALCITE-1230]
Add SQLSTATE reference data as
enum SqlStatein Avatica, and deprecateSqlStateCodesin Calcite - [CALCITE-1199]
Incorrect trimming of
CHARwhen performing cast toVARCHAR - [CALCITE-1219]
Add method
SqlOperatorBinding.isOperandLiteral()(Hsuan-Yi Chu) - [CALCITE-1222]
DatabaseMetaData.getColumnLabelreturns null when query hasORDER BY - [CALCITE-1215]
Fix missing override in
CassandraTable - [CALCITE-1212] Fix NPE on some Cassandra projects
- Remove trailing spaces from all source files
- Move HTTP utilities from Splunk adapter to core
- Test case for
[PHOENIX-2767],
non-constant in
IN - [CALCITE-1166]
Disallow sub-classes of
RelOptRuleOperand - Remove all calls to deprecated methods
- Add class
ConsList - More of [CALCITE-999] Clean up maven POM files
- [CALCITE-1204] Fix invalid Javadoc and suppress checkstyle “errors”
- [CALCITE-1170]
Allow
SqlSetOperatorto be overridden, as a regularSqlOperatorcan (Hsuan-Yi Chu) - [CALCITE-746] Allow apache-rat to be run outside of release process
Web site and documentation
- [CALCITE-1273]
Following
[CALCITE-306],
update references to
EnumerableTableAccessReltoEnumerableTableScan - Fix typo in SQL (Yi Xinglu)
- Site: add committer, and post slides/video from Polyalgebra talk
- [CALCITE-1203] Update to github-pages-67
- [CALCITE-1202] Lock version of Jekyll for bundler
- Site: add upcoming talks, and fix link to Apache phonebook
1.7.0 / 2016-03-22
This is the first Apache Calcite release since Avatica became an independent project. Calcite now depends on Avatica in the same way as it does other libraries, via a Maven dependency. To see Avatica-related changes, see the release notes for Avatica 1.7.1.
We have added an adapter for Apache Cassandra. You can map a Cassandra keyspace into Calcite as a schema, Cassandra CQL tables as tables, and execute SQL queries on them, which Calcite converts into CQL. Cassandra can define and maintain materialized views but the adapter goes further: it can transparently rewrite a query to use a materialized view even if the view is not mentioned in the query.
This release adds an
Oracle-compatibility mode.
If you add fun=oracle to your JDBC connect string, you get all of
the standard operators and functions plus Oracle-specific functions
DECODE, NVL, LTRIM, RTRIM, GREATEST and LEAST. We look
forward to adding more functions, and compatibility modes for other
databases, in future releases.
We’ve replaced our use of JUL (java.util.logging)
with SLF4J. SLF4J provides an API which Calcite can use
independent of the logging implementation. This ultimately provides additional
flexibility to users, allowing them to configure Calcite’s logging within their
own chosen logging framework. This work was done in
[CALCITE-669].
For users experienced with configuring JUL in Calcite previously, there are some
differences as some the JUL logging levels do not exist in SLF4J: FINE,
FINER, and FINEST, specifically. To deal with this, FINE was mapped
to SLF4J’s DEBUG level, while FINER and FINEST were mapped to SLF4J’s TRACE.
Compatibility: This release is tested
on Linux, Mac OS X, Microsoft Windows;
using Oracle JDK 1.7, 1.8;
Guava versions 12.0.1 to 19.0;
other software versions as specified in pom.xml.
New features
- [CALCITE-1124]
Add
TIMESTAMPADD,TIMESTAMPDIFFfunctions (Arina Ielchiieva) - [CALCITE-1066]
Add Oracle function table, and functions
DECODE,NVL,LTRIM,RTRIM,GREATEST,LEAST - [CALCITE-1080] Cassandra adapter (Michael Mior)
- [CALCITE-1062] In validation, lookup a (possibly overloaded) operator from an operator table (Hsuan-Yi Chu)
- [CALCITE-551] Sub-query inside aggregate function
Planner rules
- [CALCITE-1158]
Make
AggregateRemoveRuleextensible - [CALCITE-1116]
Extend
simplifyfor reducing expressions - [CALCITE-1104] Materialized views in Cassandra (Michael Mior)
- [CALCITE-1130]
Add support for operators
IS NULLandIS NOT NULLinRexImplicationChecker(Amogh Margoor) - [CALCITE-1129]
Extend
JoinUnionTransposeRuleto matchUnioninstead ofLogicalUnion(Vasia Kalavri) - [CALCITE-1109]
Fix up condition when pushing
FilterthroughAggregate(Amogh Margoor) - [CALCITE-1100]
If constant reduction no-ops, don’t create a new
RelNode(Hsuan-Yi Chu) - [CALCITE-1076]
Update
RelMdDistributionto match other metadata APIs (Ted Xu) - [CALCITE-1056]
In
RelBuilder, simplify predicates, and optimize awayWHERE FALSE - [CALCITE-1059]
Not valid to convert
Aggregateon empty to empty if itsGROUP BYkey is empty
Bug-fixes, API changes and minor enhancements
- [CALCITE-1147] Allow multiple providers for the same kind of metadata
- [CALCITE-1153] Invalid cast created during SQL Join in Oracle (Chris Atkinson)
- [CALCITE-1146] Wrong path in CSV example model (wanglan)
- [CALCITE-1156] Increase Jetty version to 9.2.15.v20160210
- [CALCITE-1064]
Address problematic
maven-remote-resources-plugin - In
TimeUnitaddWEEK,QUARTER,MICROSECONDvalues, and change type ofmultiplier - Deprecate
SqlLiteral.SqlSymbol;SqlSymbolcan now wrap any enum - [CALCITE-1078]
Detach avatica from the core calcite Maven project
- [CALCITE-1077] Switch Calcite to the released Avatica 1.7.1
- Update
groupIdwhen Calcite POMs reference Avatica modules - [CALCITE-1137] Exclude Avatica from Calcite source release
- [CALCITE-1111] Upgrade Guava, and test on a range of Guava versions
- [CALCITE-1054]
Wrong code generation for
TIMESTAMPvalues that may beNULL - [CALCITE-604] Tune metadata by generating a dispatcher at runtime
- [CALCITE-1063] Flat lists for 4, 5, 6 elements
- Add Orinoco schema (streaming retail data), accessible from Quidem scripts
- [CALCITE-1097] Exception when executing query with too many aggregation columns (chenzhifa)
- Add tests for leap days
- [CALCITE-553] In maven, enable compiler profiles by default
- [CALCITE-1031]
In prepared statement,
CsvScannableTable.scanis called twice - [CALCITE-1046] Matchers for testing SQL query results
- [CALCITE-1083]
SqlNode.equalsDeephas O(n ^ 2) performance - [CALCITE-998]
Exception when calling
STDDEV_SAMP,STDDEV_POP(Matthew Shaer) - [CALCITE-1071] Improve hash functions
- [CALCITE-1072]
CSV adapter incorrectly parses
TIMESTAMPvalues after noon (Chris Albright) - [CALCITE-669] Mass removal of Java Logging for SLF4J
- [CALCITE-1068]
Deprecate
Stacks - [CALCITE-1067] Test failures due to clashing temporary table names
- [CALCITE-864] Correlation variable has incorrect row type if it is populated by right side of a Join
- [CALCITE-1021] Upgrade Jackson
- [CALCITE-999] Clean up maven POM files
Web site and documentation
- [CALCITE-1112] “Powered by Calcite” page
- Add SQL-Gremlin to Adapters page
- [CALCITE-1090] Revise Streaming SQL specification
- Appoint Josh Elser to PMC
- Add “Streaming SQL” talk
- [CALCITE-623] Add a small blurb to the site about Jenkins for CI
- [CALCITE-1070] Upgrade to new Apache logo
- Document how to announce a release
- [CALCITE-1074] Delete old releases from mirroring system
1.6.0 / 2016-01-22
As usual in this release, there are new SQL features, improvements to planning rules and Avatica, and lots of bug-fixes. We’ll spotlight a couple of features make it easier to handle complex queries.
[CALCITE-816]
allows you to represent sub-queries (EXISTS, IN and scalar) as
RexSubQuery, a kind of expression in the relational algebra. Until
now, the sql-to-rel converter was burdened with expanding sub-queries,
and people creating relational algebra directly (or via RelBuilder)
could only create ‘flat’ relational expressions. Now we have planner
rules to expand and de-correlate sub-queries.
Metadata is the fuel that powers query planning. It includes
traditional query-planning statistics such as cost and row-count
estimates, but also information such as which columns form unique
keys, unique and what predicates are known to apply to a relational
expression’s output rows. From the predicates we can deduce which
columns are constant, and following
[CALCITE-1023]
we can now remove constant columns from GROUP BY keys.
Metadata is often computed recursively, and it is hard to safely and
efficiently calculate metadata on a graph of RelNodes that is large,
frequently cyclic, and constantly changing.
[CALCITE-794]
introduces a context to each metadata call. That context can detect
cyclic metadata calls and produce a safe answer to the metadata
request. It will also allow us to add finer-grained caching and
further tune the metadata layer.
Compatibility: This release is tested
on Linux, Mac OS X, Microsoft Windows;
using Oracle JDK 1.7, 1.8;
other software versions as specified in pom.xml.
New features
- [CALCITE-816]
Represent sub-query as a
RexNode - [CALCITE-854]
Implement
UNNEST ... WITH ORDINALITY - [CALCITE-1003]
Utility to convert
RelNodeto SQL (Amogh Margoor)- [CALCITE-1010]
FETCH/LIMITandOFFSETin RelToSqlConverter (Amogh Margoor) - Move code from
JdbcImplementorandJdbcRulesto new classSqlImplementor - Deduce dialect’s null collation from
DatabaseMetaData - Fix
RelToSqlConverterTeston Windows
- [CALCITE-1010]
- Following
[CALCITE-897],
empty string for
booleanproperties means true - [CALCITE-992]
Validate and resolve sequence reference as a
Tableobject - [CALCITE-968] Stream-to-relation and stream-to-stream joins (Milinda Pathirage)
- [CALCITE-1041]
User-defined function that returns
DATEorTIMESTAMPvalue - [CALCITE-986]
User-defined function with
DATEorTIMESTAMPparameters - [CALCITE-958] Overloaded Table Functions with named arguments (Julien Le Dem)
- [CALCITE-970]
If
NULLS FIRST/NULLS LASTnot specified, sortNULLvalues high
Avatica features and bug-fixes
- [CALCITE-1040] Differentiate better between arrays and scalars in protobuf
- [CALCITE-934]
Use an OS-assigned ephemeral port for
CalciteRemoteDriverTest - [CALCITE-767] Create Avatica RPC endpoints for commit and rollback commands
- [CALCITE-983]
Handle nulls in
ErrorResponse’s protobuf representation better - [CALCITE-989] Add server’s address in each response
- Fix some bugs found by static analysis
- Make all
equalsandhashCodemethods uniform - [CALCITE-962]
Propagate the cause, not just the cause’s message, from
JdbcMeta
Planner rules
- [CALCITE-1057]
Add
RelMetadataProviderparameter to standard plannerPrograms - [CALCITE-1055]
SubQueryRemoveRuleshould createCorrelate, notJoin, for correlated sub-queries - [CALCITE-978]
Enable customizing constant folding rule behavior when a
Filtersimplifies to false (Jason Altekruse) - [CALCITE-977]
Make the constant expression
Executorconfigurable inFrameworkConfig(Jason Altekruse) - [CALCITE-1058]
Add method
RelBuilder.empty, and rewrite LIMIT 0 and WHERE FALSE to it - [CALCITE-996]
Simplify predicate when we create a
Filteroperator - Simplify
RexProgram, in particular(NOT CASE ... END) IS TRUE, which occurs in whenNOT INis expanded - Fix variant of
[CALCITE-923]
that occurs in
RelOptRulesTest.testPushFilterPastProject - [CALCITE-1023]
and
[CALCITE-1038]
Planner rule that removes
Aggregatekeys that are constant - [CALCITE-1018]
SortJoinTransposeRulenot firing due togetMaxRowCount(RelSubset)returning null - [CALCITE-1019]
RelMdUtil.checkInputForCollationAndLimit()was wrong withalreadySortedcheck - Not safe to use ‘=’ for predicates on constant expressions that might be null
- [CALCITE-993] Pull up all constant expressions, not just literals, as predicates
- [CALCITE-1005]
Handle null in
getMaxRowCountforAggregate(Mike Hinchey) - [CALCITE-995] Sort transpose rules might fall in an infinite loop
- [CALCITE-987]
Pushing
LIMIT 0results in an infinite loop (Pengcheng Xiong) - [CALCITE-988]
FilterToProjectUnifyRule.invert(MutableRel, MutableRel, MutableProject)works incorrectly - [CALCITE-969]
Composite
EnumerableSortwithDESCwrongly sortsNULLvalues low - [CALCITE-959]
Add description to
SortProjectTransposeRule’s constructor
Bug-fixes, API changes and minor enhancements
- [CALCITE-1060]
Fix test deadlock by initializing
DriverManagerbefore registeringAlternatingDriver - [CALCITE-1047]
ChunkList.clearthrowsAssertionError - [CALCITE-1053]
CPU spin,
ReflectiveRelMetadataProvider.applywaiting forHashMap.get - Upgrade toolbox, to fix line length issue on Windows
- [CALCITE-1051] Underflow exception due to scaling IN clause literals (Frankie Bollaert)
- [CALCITE-975] Allow Planner to return validated row type together with SqlNode
- [CALCITE-1020]
Add
MILLISECONDinTimeUnit(Pengcheng Xiong) - [CALCITE-794] Detect cycles when computing statistics (This is a breaking change.)
- Tune algorithm that deduces the return type of
ANDexpression - [CALCITE-842] Decorrelator gets field offsets confused if fields have been trimmed
- Fix
NullPointerExceptioninSqlJoin.toString() - Add
ImmutableBitSet.rebuild() - [CALCITE-915]
Tests now unset
ThreadLocalvalues on exit - [CALCITE-1036]
DiffRepositoryshould not insert new resources at the end of the repository - [CALCITE-955]
Litmus(continuation-passing style for methods that check invariants) -
RelBuilder.projectnow does nothing if asked to project the identity with the same field names - Deprecate some
Utilmethods, and upgrade last Maven modules to JDK 1.7 - Document
RelOptPredicateList - Add
ImmutableNullableList.copyOf(Iterable) - Fix “endPosTable already set” error from
javac - Add benchmark of
Parser.create(sql).parseQuery() - [CALCITE-1042]
Ensure that
FILTERisBOOLEAN NOT NULL - [CALCITE-1039]
Assign a
SqlKindvalue for each built-in aggregate function - [CALCITE-1030]
JSON
ModelHandlercallingSchemaPlus.setCacheEnabled()causesUnsupportedOperationExceptionwhen usingSimpleCalciteSchema - [CALCITE-1028] Move populate materializations after sql-to-rel conversion
- [CALCITE-1034] Use a custom checker for code style rules that Checkstyle cannot express
- [CALCITE-1032] Verify javadoc of private methods
- [CALCITE-1015]
OFFSET 0causesAssertionError(Zhen Wang) - [CALCITE-1024] In a planner test, if a rule should have no effect, state that explicitly
- [CALCITE-1016]
GROUP BY *constant*on empty relation should return 0 rows - [CALCITE-1022]
Rename
.oqQuidem files to.iq - [CALCITE-980]
Fix
ANDandORimplementation inEnumerableconvention - [CALCITE-459] When parsing SQL, allow single line comment on last line (Zhen Wang)
- [CALCITE-1009]
SelfPopulatingListis not thread-safe - [CALCITE-1008]
Replace
CloseablewithAutoCloseable - [CALCITE-1001] Upgrade to quidem-0.7
- [CALCITE-990]
In
VolcanoPlanner, populateRelOptRuleCall.nodeInputsfor operands of type “any” - [CALCITE-966]
VolcanoPlannernow clearsruleNamesin order to avoid rule name conflicting error - Factor user-defined function tests from
JdbcTesttoUdfTest, and classes intoSmalls - [CALCITE-974]
Exception while validating
DELETE(Yuri Au Yong) - [CALCITE-964]
Rename
timezoneconnection property totimeZone
Web site and documentation
- Avatica
- [CALCITE-1033] Introduce Avatica protobuf documentation
- [CALCITE-1029] Add “purpose” descriptions to Avatica JSON docs
- [CALCITE-984] Massive cleanup of Avatica JSON docs
- [CALCITE-861]
Be explicit that
mvn testneeds to be invoked - [CALCITE-997] Document keywords
- [CALCITE-979] Broken links in web site
- [CALCITE-961] Web site: Add downloads and Apache navigation links
- [CALCITE-960]
Download links for pgp, md5,
KEYSfiles, and direct from mirrors - Remove embedded date-stamps from javadoc; add javadoc for test classes
- [CALCITE-965] Link to downloads page from each release news item
1.5.0 / 2015-11-06
Our first release as a top-level Apache project!
Avatica has undergone major improvements, including a new RPC layer that uses protocol buffers, support for DML statements, better support for bind variables and unique identifiers for connections and statements.
There are lots of improvements to planner rules, and the logic that replaces relational expressions with equivalent materializations.
We continue to find more uses for
RelBuilder.
We now recommend that you use RelBuilder whenever you create
relational expressions within a planner rule; the rule can then be
re-used to create different sub-classes of relational expression, and
the builder will perform simple optimizations automatically.
Using RelBuilder we built Piglet,
a subset of the classic Hadoop language
Pig.
Pig is particularly interesting because it makes heavy use of nested
multi-sets. You can follow this example to implement your own query
language, and immediately taking advantage of Calcite’s back-ends and
optimizer rules. It’s all just algebra, after all!
New features
- [CALCITE-911]
Add a variant of
CalciteSchemathat does not cache sub-objects - [CALCITE-845]
Derive
SUM’s return type by a customizable policy (Maryann Xue) - [CALCITE-916]
Support table function that implements
ScannableTable- Example table function that generates mazes and their solutions
- [CALCITE-941]
Named, optional and
DEFAULTarguments to function calls; support named arguments when calling table functions and table macros - [CALCITE-910]
Improve handling of
ARRAY,MULTISET,STRUCTtypes - [CALCITE-879]
COLLECTaggregate function - [CALCITE-546] Allow table, column and field called ‘*’
- [CALCITE-893] Theta join in JDBC adapter
- Linq4j: Implement
EnumerableDefaultsmethods (MiNG) - [CALCITE-823]
Add
ALTER ... RESETstatement (Sudheesh Katkam) - [CALCITE-881]
Allow schema.table.column references in
GROUP BY - [CALCITE-852] DDL statements
- [CALCITE-851] Add original SQL string as a field in the parser
- [CALCITE-819]
Add
RelRoot, a contract for the result of a relational expression
Avatica features and bug-fixes
- [CALCITE-951] Print the server-side stack in the local exception (Josh Elser)
- [CALCITE-936] Make HttpServer configurable (Navis Ryu)
- [CALCITE-903] Enable Avatica client to recover from missing server-side state (Josh Elser)
- [CALCITE-921]
Fix incorrectness when calling
getString()on binary data (Josh Elser) - [CALCITE-913]
Construct proper
ColumnMetaDatafor arrays (Josh Elser) - [CALCITE-871]
In
JdbcMeta, register each statement using an id from a generator (Bruno Dumon) - [CALCITE-645]
Implement
AvaticaSqlExceptionto pass server-side exception information to clients (Josh Elser) - [CALCITE-912]
Add Avatica
OpenConnectionRequest(Bruno Dumon) - [CALCITE-919]
Avoid
setScaleonBigDecimalwhen scale is 0 (Josh Elser) - [CALCITE-927] Call finagle for all calls that return ResultSetResponses (Josh Elser)
- [CALCITE-705]
DML in Avatica, and split
Executeout fromFetchrequest (Yeong Wei) - [CALCITE-914]
Add
JsonSubTypeforExecuteResponse, and fix JSON docs (Josh Elser) - [CALCITE-905]
getTablesreturns empty result inJdbcMeta(Jan Van Besien) - [CALCITE-906]
Avatica
JdbcMetastatement IDs are not unique - [CALCITE-866] Break out Avatica documentation and add JSON reference (Josh Elser)
- [CALCITE-843]
AvaticaConnection.getAutoCommitthrowsNullPointerException - [CALCITE-840] Protocol buffer serialization over HTTP for Avatica Server (Josh Elser)
Materializations
- [CALCITE-952] Organize applicable materializations in reversed topological order (Maryann Xue)
- [CALCITE-890] Register all combinations of materialization substitutions (Maryann Xue)
- [CALCITE-891]
When substituting materializations, match
TableScanwithoutProject(Maryann Xue) - [CALCITE-890] Register all combinations of materialization substitutions (Maryann Xue)
- [CALCITE-925] Match materialized views when predicates contain strings and ranges (Amogh Margoor)
- [CALCITE-793] Planner requires unnecessary collation when using materialized view (Maryann Xue)
- [CALCITE-825]
Allow user to specify sort order of an
ArrayTable
Planner rules
- [CALCITE-953]
Improve
RelMdPredicatesto deal withRexLiteral(Pengcheng Xiong) - [CALCITE-939]
Variant of
SortUnionTransposeRulefor order-preservingUnion(Maryann Xue) - [CALCITE-931]
Wrong collation trait in
SortJoinTransposeRulefor right joins (Maryann Xue) - [CALCITE-938]
More accurate rowCount for
Aggregateapplied to already unique keys (Maryann Xue) - [CALCITE-935]
Improve how
ReduceExpressionsRulehandles duplicate constraints (Pengcheng Xiong) - [CALCITE-922]
Extract value of an
INTERVALliteral (Hsuan-Yi Chu) - [CALCITE-889]
Implement
SortUnionTransposeRule(Pengcheng Xiong) - [CALCITE-909]
Make
ReduceExpressionsRuleextensible - [CALCITE-856] Make more rules extensible
- [CALCITE-902]
Match nullability when reducing expressions in a
Project - [CALCITE-895]
Simplify “(
CASE…END) = constant” insideANDorOR(Hsuan-Yi Chu) - [CALCITE-828] Use RelBuilder in rules rather than type-specific RelNode factories
- [CALCITE-892]
Implement
SortJoinTransposeRule - [CALCITE-876]
After pushing
LogicalProjectpastLogicalWindow, adjust references to constants properly (Hsuan-Yi Chu) - [CALCITE-844]
Push
ProjectthroughWindow(Hsuan-Yi Chu) - [CALCITE-841] Redundant windows when window function arguments are expressions (Hsuan-Yi Chu)
- [CALCITE-846]
Push
AggregatewithFilterthroughUnion(all)
RelBuilder and Piglet
- [CALCITE-933]
RelBuilder.scan()now gives a nice exception if the table does not exist (Andy Grove) - Fix Piglet
DUMPapplied to multisets and structs - Multisets and
COLLECTin Piglet - [CALCITE-785] Add “Piglet”, a subset of Pig Latin on top of Calcite algebra
- [CALCITE-869]
Add
VALUEScommand to Piglet - [CALCITE-868]
Add API to execute queries expressed as
RelNode - In RelBuilder, build expressions by table alias
Bug-fixes, API changes and minor enhancements
- [CALCITE-948]
Indicator columns not preserved by
RelFieldTrimmer - Fix Windows issues (line endings and checkstyle suppressions)
- [CALCITE-937] User-defined function within view
- [CALCITE-926] Rules fail to match because of missing link to parent equivalence set (Maryann Xue)
- [CALCITE-908] Bump protobuf to 3.0.0-beta-1, fix deprecations and update docs (Josh Elser)
- [CALCITE-932]
Fix muddled columns when
RelFieldTrimmeris applied toAggregate - [CALCITE-930] Now Calcite is a top-level project, remove references to “incubating”
- [CALCITE-929]
Calls to
AbstractRelNodemay result in NPE - [CALCITE-923]
Type mismatch when converting
LEFT JOINtoINNER - [CALCITE-666] Anti-semi-joins against JDBC adapter give wrong results (Yeong Wei)
- [CALCITE-918]
createProjectinRelOptUtilshould uniquify field names - [CALCITE-792]
Obsolete
RelNode.isKeyandisDistinctmethods - Allow FlatLists of different length to be compared
- [CALCITE-898]
Type of ‘Java
* `INTEGER`' should be `BIGINT` - [CALCITE-894]
Do not generate redundant column alias for the left relation when
translating
INsub-query (Maryann Xue) - [CALCITE-897] Enable debugging using “-Dcalcite.debug”
- [CALCITE-885] Add Oracle test environment
- [CALCITE-888]
Overlay window loses
PARTITION BYlist (Hsuan-Yi Chu) - [CALCITE-886]
System functions in
GROUP BYclause - [CALCITE-860] Correct LICENSE file for generated web site
- [CALCITE-882] Allow web site to be deployed not as the root directory of the web server (Josh Elser)
- Upgrade parent POM to apache-17
- [CALCITE-687] Synchronize HSQLDB at a coarse level using a Lock (Josh Elser)
- [CALCITE-870] Remove copyright content from archers.json
- Replace
StackwithArrayDeque - [CALCITE-874]
ReflectiveRelMetadataProvideris not thread-safe - Add
LogicalWindow.create() - Add
ImmutableBitSet.get(int, int) - [CALCITE-865]
Unknown table type causes
NullPointerExceptioninJdbcSchema- Add table types used by Oracle and DB2
- [CALCITE-862]
JdbcSchemagivesNullPointerExceptionon non-standard column type (Marc Prud’hommeaux) - [CALCITE-847]
AVGwindow function inGROUP BYgivesAssertionError(Hsuan-Yi Chu) - [CALCITE-827]
Calcite incorrectly permutes columns of
OVERquery (Hsuan-Yi Chu) - [CALCITE-809]
TableScandoes not support large/infinite scans (Jesse Yates) - Lazily create exception only when it needs to be thrown (Marc Prud’hommeaux)
- [CALCITE-812] Make JSON reader and writer use properly quoted key names (Marc Prud’hommeaux)
- [CALCITE-820]
Validate that window functions have
OVERclause (Hsuan-Yi Chu) - [CALCITE-824]
Type inference when converting
INclause to semijoin (Josh Wills)
1.4.0-incubating / 2015-09-02
In addition to a large number of bug-fixes and minor enhancements, this release includes improvements to lattices and materialized views, and adds a builder API so that you can easily create relational algebra expressions.
New features
- [CALCITE-748]
Add
RelBuilder, builder for expressions in relational algebra - [CALCITE-758] Use more than one lattice in the same query (Rajat Venkatesh)
- [CALCITE-761] Pre-populated materializations (Maryann Xue)
- [CALCITE-786] Detect if materialized view can be used to rewrite a query in non-trivial cases (Amogh Margoor)
- [CALCITE-732]
Implement multiple distinct-
COUNTusingGROUPING SETS - Add various
BitSetandImmutableBitSetutilities
Web site updates
- [CALCITE-810] Add committers’ organizations to the web site
- Add news item (XLDB best lighting talk), and some talks
- Fix javadoc links
- Add license notice for web site
- Wrap file header in HTML comments
- How to release
- Move disclaimer out of every page’s footer and into home page and downloads page
- For web site files, add license headers where possible, apache-rat exclusions otherwise
- Calcite DOAP
- [CALCITE-355] Web site
Bug-fixes, API changes and minor enhancements
- [CALCITE-741]
Ensure that the source release’s
DEPENDENCIESfile includes all module dependencies - [CALCITE-743] Ensure only a single source assembly is executed
- [CALCITE-850]
Remove push down expressions from
FilterJoinRuleand create a new rule for it - [CALCITE-834]
StackOverflowErrorgetting predicates from the metadata provider - [CALCITE-833]
RelOptUtil.splitJoinConditionincorrectly splits a join condition (Hsuan-Yi Chu) - [CALCITE-822]
Add a unit test case to test collation of
LogicalAggregate - [CALCITE-822]
Revert incorrect
LogicalAggregatecollation inferring logic made in [CALCITE-783] (Milinda Pathirage) - [CALCITE-826]
Use
ProjectFactoryinAggregateJoinTranposeRuleandFilterJoinRule - [CALCITE-821]
Frameworksgives NPE whenFrameworkConfighas no default schema - [CALCITE-811]
Extend
JoinProjectTransposeRulewith option to support outer joins - [CALCITE-805] Add support for using an alternative grammar specification for left and right curly braces. Additionally, add support for including addition token manager declarations
- [CALCITE-803]
Add
MYSQL_ANSILexing policy - [CALCITE-717] Compare BINARY and VARBINARY on unsigned byte values (Low Chin Wei)
- [CALCITE-814]
RexBuilderreverses precision and scale ofDECIMALliteral - [CALCITE-813]
Upgrade
updateCount,maxRowsfrom int to long - [CALCITE-714] When de-correlating, push join condition into sub-query
- [CALCITE-751] Push aggregate with aggregate functions through join
- Add
RelBuilder.avg - [CALCITE-806]
ROW_NUMBERshould emit distinct values - Document JSON model, making javadoc consistent with the model reference
- [CALCITE-808]
Optimize
ProjectMergeRule - [CALCITE-791]
Optimize
RelOptUtil.pushFilterPastProject - [CALCITE-783]
Infer collation of
Projectusing monotonicity (Milinda Pathirage) - Change the argument types of
SqlOperator.getMonotonicityto allow it to be used forRexNodeas well asSqlNode - [CALCITE-800] Window function defined within another window function should be invalid (Hsuan-Yi Chu)
- [CALCITE-787] Star table wrongly assigned to materialized view (Amogh Margoor)
- Remove duplicate resources from XML test reference files
- [CALCITE-795] Loss of precision when sending a decimal number via the remote JSON service (Lukáš Lalinský)
- [CALCITE-774]
When
GROUP BYis present, ensure that window function operands only refer to grouping keys (Hsuan-Yi Chu) - [CALCITE-799]
Incorrect result for
HAVING count(*) > 1 - [CALCITE-801]
NullPointerExceptionusingUSINGon table alias with column aliases - [CALCITE-390] Infer predicates for semi-join
- [CALCITE-789]
MetaImpl.MetaCatalogshould exposeTABLE_CATinstead ofTABLE_CATALOG - [CALCITE-752] Add back sqlline as a dependency to csv example
- [CALCITE-780] HTTP error 413 when sending a long string to the Avatica server
- In
RelBuilder, callingsortthenlimithas same effect as callingsortLimit - Add
Ord.reverse - [CALCITE-788]
Allow
EnumerableJointo be sub-classed (Li Yang) - [CALCITE-280]
BigDecimalunderflow (Li Yang) - [CALCITE-763]
Missing translation from
SorttoMutableSort(Maryann Xue) - [CALCITE-770] Ignore window aggregates and ranking functions when finding aggregate functions
- [CALCITE-765]
Set
Content-Typefrom the RPC server toapplication/json(Lukáš Lalinský) - Fix Windows line-endings in
RelBuilderTest - [CALCITE-727]
Constant folding involving
CASEandNULL - Related to [CALCITE-758], speed up matching by not considering tiles separately from other materialized views
- Test case and workaround for
[CALCITE-760]
Aggregaterecommender blows up if row count estimate is too high - [CALCITE-753]
Aggregateoperators may derive row types with duplicate column names - [CALCITE-457] Push condition of non-ansi join into join operator
- Change jsonRequest encoding to UTF-8 (Guitao Ding)
- [CALCITE-757] Fix expansion of view of another view (Venki Korukanti)
- Fix coverity warnings
- Remove deprecated
SqlTypeNamemethods - [CALCITE-754]
Validator error when resolving
OVERclause ofJOINquery - [CALCITE-429] Cardinality provider for use by lattice algorithm
- [CALCITE-740]
Redundant
WHEREclause causes wrong result in MongoDB adapter - [CALCITE-665]
ClassCastExceptionin MongoDB adapter - Separate
TableFactoryfrom suggested table name, so oneTableFactorycan be used for several tables - [CALCITE-749]
Add
MaterializationService.TableFactory(Rajat Venkatesh) - [CALCITE-718]
Enable fetch to work for
Statement.execute()for Avatica (Xavier Leong) - [CALCITE-712]
Obey
setMaxRowsfor statement execute (Xavier Leong) - Add
LoggingLocalJsonService, to make it easier to test that JDBC requests cause the right RPCs - [CALCITE-708]
Implement
DatabaseMetaData.getTypeInfo(Xavier Leong) - Enable Travis CI on new-master branch and bug-fix branches named “NNN-description”
- Clean up
- Upgrade tpcds
- Make
JdbcTest.testVersionmore permissive, so thatversion.majorandversion.minorcan be set just before a release, rather than just after as at present
1.3.0-incubating / 2015-05-30
Mainly bug-fixes, but this release adds support for modifiable views and filtered aggregate functions and various improvements to Avatica.
New features
- [CALCITE-505] Support modifiable view
- [CALCITE-704]
FILTERclause for aggregate functions - [CALCITE-522] In remote JDBC driver, transmit static database properties as a map
- [CALCITE-661] Remote fetch in Calcite JDBC driver
- Support Date, Time, Timestamp parameters
API changes
- [CALCITE-722] Rename markdown files to lower-case
- [CALCITE-697]
Obsolete class
RelOptQuery - [CALCITE-693]
Allow clients to control creation of
RelOptCluster - [CALCITE-691] Allow projects to supply alternate SQL parser
- [CALCITE-675]
Enable
AggregateProjectMergeRulein standard rule set - [CALCITE-679]
Factory method for
SemiJoin - [CALCITE-674]
Add a
SWAP_OUTERstatic instance toJoinCommuteRule(Maryann Xue) - [CALCITE-735]
Primitive.DOUBLE.minshould be large and negative
Bug-fixes and internal changes
- [CALCITE-688]
splitConditiondoes not behave correctly when one side of the condition references columns from different inputs - [CALCITE-259]
Using sub-queries in
CASEstatement against JDBC tables generates invalid Oracle SQL (Yeong Wei) - In sample code in README.md, rename optiq to calcite (Ethan)
- [CALCITE-720]
VolcanoPlanner.ambitiouscomment doc is inconsistent (Santiago M. Mola) - [CALCITE-729]
IndexOutOfBoundsExceptioninROLLUPquery on JDBC data source - [CALCITE-733]
Multiple distinct-
COUNTquery gives wrong results - [CALCITE-730]
ClassCastExceptionin table fromCloneSchema - [CALCITE-728] Test suite hangs on Windows
- [CALCITE-723] Document lattices
- [CALCITE-515] Add Apache headers to markdown files
- Upgrade quidem
- [CALCITE-716]
Scalar sub-query and aggregate function in
SELECTorHAVINGclause givesAssertionError - [CALCITE-694]
Scan
HAVINGclause for sub-queries andIN-lists (Hsuan-Yi Chu) - Upgrade hydromatic-resource-maven-plugin
- [CALCITE-710]
Identical conditions in the
WHEREclause causeAssertionError(Sean Hsuan-Yi Chu) - [CALCITE-695]
Do not add
SINGLE_VALUEaggregate function to a sub-query that will never return more than one row (Hsuan-Yi Chu) - Add tests for scalar sub-queries, including test cases for
[CALCITE-709]
Errors with
LIMITinside scalar sub-query - [CALCITE-702] Add validator test for monotonic expressions
- [CALCITE-699] In Avatica, synchronize access to Calendar
- [CALCITE-700] Pass time zone into tests
- [CALCITE-698]
For
GROUP BY (),areColumnsUnique()should return true for any key - Disable tests that fail under JDK 1.7 due to [CALCITE-687]
- Add “getting started” to HOWTO
- [CALCITE-692] Add back sqlline as a dependency
- [CALCITE-677]
RemoteDriverTest.testTypeHandlingfails east of Greenwich - Disable test for
[CALCITE-687]
Make
RemoteDriverTest.testStatementLifecyclethread-safe - [CALCITE-686]
SqlNode.unparseproduces invalid SQL - [CALCITE-507] Update HOWTO.md with running integration tests
- Add H2 integration test
- Add Postgres integration test
- [CALCITE-590] Update MongoDB test suite to calcite-test-dataset
- Add
CalciteAssert.assertArrayEqualfor more user-friendly asserts - [CALCITE-585]
Avatica JDBC methods should throw
SQLFeatureNotSupportedException(Ng Jiunn Jye) - [CALCITE-671]
ByteStringdoes not deserialize properly as aFetchRequestparameter value - [CALCITE-676]
AssertionErrorinGROUPING SETSquery - [CALCITE-678]
SemiJoinRulemixes up fields whenAggregate.groupSetis not field #0
1.2.0-incubating / 2015-04-07
A short release, less than a month after 1.1.
There have been many changes to Avatica, hugely improving its coverage of the
JDBC API and overall robustness. A new provider, JdbcMeta, allows
you to remote an existing JDBC driver.
[CALCITE-606] improves how the planner propagates traits such as collation and distribution among relational expressions.
[CALCITE-613] and [CALCITE-307] improve implicit and explicit conversions in SQL.
New features
- [CALCITE-366] Support Aggregate push down in bushy joins (Jesus Camacho Rodriguez)
- [CALCITE-613] Implicitly convert character values in comparisons
- [CALCITE-307]
Implement
CASTbetween date-time types - [CALCITE-634]
Allow
ORDER BYaggregate function inSELECT DISTINCT, provided that it occurs inSELECTclause (Sean Hsuan-Yi Chu) - In linq4j, implement
firstOrDefault,single, andsingleOrDefaultmethods (Daniel Cooper) - JDBC adapter
- [CALCITE-631] Push theta joins down to JDBC adapter (Ng Jiunn Jye)
- [CALCITE-657]
NullPointerExceptionwhen executingJdbcAggregate.implementmethod (Yuri Au Yong)
- Metadata
- [CALCITE-659]
Missing types in
averageTypeValueSizemethod inRelMdSize(Jesus Camacho Rodriguez) - [CALCITE-650]
Add metadata for average size of a tuple in
SemiJoin(Jesus Camacho Rodriguez) - [CALCITE-649]
Extend
splitConditionmethod inRelOptUtilto handle multiple joins on the same key (Jesus Camacho Rodriguez)
- [CALCITE-659]
Missing types in
Avatica features and bug-fixes
- [CALCITE-670]
AvaticaPreparedStatementshould supportexecute()andexecuteUpdate()(Nick Dimiduk) - [CALCITE-641] Implement logging throughout Avatica server (Nick Dimiduk)
- [CALCITE-646]
AvaticaStatement.executemethod broken over remote JDBC (Yeong Wei and Julian Hyde) - [CALCITE-660] Improve Avatica date support
- [CALCITE-655]
Implement
ConnectionSyncRPC (Nick Dimiduk) - [CALCITE-654]
Tighten up
AvaticaStatement.executesemantics (Nick Dimiduk) - [CALCITE-658] Cleanup dependency usage (Nick Dimiduk)
- [CALCITE-652]
Move server pieces of
avaticaintoavatica-server(Nick Dimiduk) - [CALCITE-651]
In
JdbcMeta, convert property definitions to an enum (Nick Dimiduk) - [CALCITE-640] Avatica server should expire stale connections/statements (Nick Dimiduk)
- [CALCITE-639] Open up permissions on avatica server components (Nick Dimiduk)
- [CALCITE-637]
Implement Avatica
CloseConnectionRPC (Nick Dimiduk) - [CALCITE-636] Connection isolation for Avatica clients (Nick Dimiduk)
- [CALCITE-626]
Implement
CloseStatementRPC (Nick Dimiduk) - [CALCITE-630]
Flesh out
AvaticaParameter.setObject(Nick Dimiduk) - [CALCITE-627]
Add Avatica support for
getTableTypes,getColumns(Xavier FH Leong) - [CALCITE-618]
Add Avatica support for
getTables(Julian Hyde and Nick Dimiduk)
API changes
- [CALCITE-617]
Check at initialization time in
CachingInvocationHandlerthat MD provider is not null (Jesus Camacho Rodriguez) - [CALCITE-638]
SQL standard
REALis 4 bytes,FLOATis 8 bytes
Bug-fixes and internal changes
- [CALCITE-672]
SQL
ANYtype should be nullable (Jinfeng Ni) - Disable tests, pending [CALCITE-673] Timeout executing joins against MySQL
- Fix traits in MongoDB adapter, and
NullPointerExceptioninJdbcTest - [CALCITE-662]
Query validation fails when an
ORDER BYclause is used withWITH CLAUSE - [CALCITE-606] Fix trait propagation and add test case
- Remove checkstyle Eclipse properties from git tracking
- [CALCITE-644] Increase check style line limit to 100 chars (Nick Dimiduk)
- [CALCITE-648]
Update
ProjectMergeRuledescription for new naming convention (Jinfeng Ni) - [CALCITE-625]
README.mdlinking to the wrong page ofoptiq-csv(hongbin ma) - [CALCITE-632]
Sort order returned by
SUPERCLASS_COMPARATORinReflectiveRelMetadataProvideris inconsistent (Jesus Camacho Rodriguez) - [CALCITE-335]
Remove uses of linq4j
Functions.adapt - [CALCITE-592] Upgrade to Guava 14.0.1
- [CALCITE-596] JDBC adapter incorrectly reads null values as 0 (Ng Jiunn Jye)
- [CALCITE-633]
WITH ... ORDER BYcannot find table - [CALCITE-614]
INclause inCASEinGROUP BYgivesAssertionError - [CALCITE-619] Slim down dependencies in parent POM
1.1.0-incubating / 2015-03-13
This Calcite release makes it possible to exploit physical properties
of relational expressions to produce more efficient plans, introducing
collation and distribution as traits, Exchange relational operator,
and several new forms of metadata.
We add experimental support for streaming SQL.
This release drops support for JDK 1.6; Calcite now requires 1.7 or later.
We have introduced static create methods for many sub-classes of
RelNode. We strongly suggest that you use these rather than
calling constructors directly.
New features
- SQL
- [CALCITE-602] Streaming queries (experimental)
- [CALCITE-588]
Allow
TableMacroto consume maps and collections - [CALCITE-583]
Operator
||mishandlesANYtype (Sean Hsuan-Yi Chu)
- Planner rule improvements
- [CALCITE-445]
Pull up filters rejected by a
ProjectableFilterableTable - [CALCITE-600]
Use
SetOpFactoryin rules containingUnionoperator (Jesus Camacho Rodriguez) - [CALCITE-603]
Metadata providers for size, memory, parallelism
- [CALCITE-607] Change visibility of constructor in metadata providers for size, memory, parallelism (Jesus Camacho Rodriguez)
- [CALCITE-608]
Exception is thrown when
RelMdDistributionforProjectoperator is called (Jesus Camacho Rodriguez)
- [CALCITE-445]
Pull up filters rejected by a
- Collation and distribution as traits
- [CALCITE-88]
Add collation as a trait and a kind of
RelNodemetadata - [CALCITE-569]
ArrayIndexOutOfBoundsExceptionwhen deducing collation (Aman Sinha) - [CALCITE-581]
Add
LogicalSortrelational expression, and makeSortabstract - [CALCITE-526]
Add
EnumerableMergeJoin, which exploits sorted inputs - [CALCITE-71] Provide a way to declare that tables are sorted
- [CALCITE-576]
Make
RelCollationtrait andAbstractRelNode.getCollationListconsistent - [CALCITE-254]
Propagate
RelCollationon aliased columns inJoinRule - [CALCITE-569]
ArrayIndexOutOfBoundsExceptionwhen deducing collation - [CALCITE-594]
Add
RelDistributiontrait andExchangerelational expression
- [CALCITE-88]
Add collation as a trait and a kind of
API changes
- Many sub-classes of
RelNodenow have a staticcreatemethod which automatically sets up traits such as collation and distribution. The constructors are not marked deprecated, but we strongly suggest that you use thecreatemethod if it exists. - [CALCITE-591] Drop support for Java 1.6 (and JDBC 4.0)
- [CALCITE-587]
Upgrade
jetty-serverto 9.2.7.v20150116 and port avatica-serverHttpServer(Trevor Hartman) - [CALCITE-577] Revert temporary API changes introduced in [CALCITE-575]
- Add means to create
Contextinstances by wrapping objects and by chaining contexts - [CALCITE-599]
EquiJoinin wrong package (Jesus Camacho Rodriguez) - [CALCITE-573]
Use user-given names in
RelOptUtil.createProjectandcreateRename - [CALCITE-572]
Remove
Project.flags(methods are deprecated, to be removed before 2.0)
Bug-fixes and internal changes
- Remove the
LICENSEfile of calcite-example-csv (the former optiq-csv) and move its history into main history - [CALCITE-615] AvaticaParameter should be Jackson serializable (Nick Dimiduk)
- [CALCITE-612] Update AvaticaStatement to handle cancelled queries (Parth Chandra)
- [CALCITE-605] Reduce dependency on third-party maven repositories
- [CALCITE-611]
Method
setAggChildKeysshould take into account indicator columns ofAggregateoperator (Jesus Camacho Rodriguez) - [CALCITE-566]
ReduceExpressionsRulerequires planner to have anExecutor - Refactor
TableScanNode.createmethod - [CALCITE-593]
Validator in
Frameworksshould expand identifiers (Jinfeng Ni) - Australian time-zones changed in
tzdata2014f, Java 1.8.0_31 - [CALCITE-580]
Average aggregation on an
Integercolumn throwsClassCastException - In Travis, ask Surefire to print results to screen
- [CALCITE-586]
Prevent JSON serialization of
Signature.internalParameters
1.0.0-incubating / 2015-01-31
Calcite’s first major release.
Since the previous release we have re-organized the into the org.apache.calcite
namespace. To make migration of your code easier, we have described the
mapping from old to new class names
as an attachment to
[CALCITE-296].
The release adds SQL support for GROUPING SETS, EXTEND, UPSERT and sequences;
a remote JDBC driver;
improvements to the planner engine and built-in planner rules;
improvements to the algorithms that implement the relational algebra,
including an interpreter that can evaluate queries without compilation;
and fixes about 30 bugs.
New features
- SQL
- [CALCITE-494]
Support
NEXT/CURRENT VALUE FORsyntax for using sequences - [CALCITE-492]
Support
UPSERTstatement in parser - [CALCITE-493]
Add
EXTENDclause, for defining columns and their types at query/DML time - [CALCITE-497] Support optional qualifier for column name references
- [CALCITE-356]
Allow column references of the form
schema.table.column - [CALCITE-462]
Allow table functions in
LATERALexpression - [CALCITE-282]
Add
{fn QUARTER(date)}function (Benoy Antony) - Grouping sets
- [CALCITE-370]
Support
GROUPING SETS,CUBE,ROLLUPin SQL and algebra - [CALCITE-512]
Add
GROUP_ID,GROUPING_ID,GROUPINGfunctions
- [CALCITE-370]
Support
- [CALCITE-494]
Support
- Planner rule improvements
- [CALCITE-92]
Optimize away
Projectthat merely renames fields - Detect and merge duplicate predicates
AND(x, y, x)toAND(x, y)in more circumstances - [CALCITE-557]
Speed up planning by never creating
AbstractConverter - [CALCITE-545] When a projected expression can only have one value, replace with that constant
- Grouping sets
- [CALCITE-542]
Support for
Aggregatewith grouping sets inRelMdColumnOrigins(Jesus Camacho Rodriguez) - [CALCITE-533]
Support for grouping sets in
FilterAggregateTransposeRule(Jesus Camacho Rodriguez) - [CALCITE-532]
Support for grouping sets in
AggregateFilterTransposeRule(Jesus Camacho Rodriguez) - [CALCITE-513]
Support for grouping sets in
AggregateProjectMergeRule(Jesus Camacho Rodriguez) - [CALCITE-510]
Support for grouping sets in
AggregateExpandDistinctAggregatesRule(Jesus Camacho Rodriguez) - [CALCITE-502]
Support for grouping sets in
AggregateUnionTransposeRule(Jesus Camacho Rodriguez) - [CALCITE-503]
Tests to check rules on
Aggregateoperator without grouping sets (Jesus Camacho Rodriguez)
- [CALCITE-542]
Support for
- [CALCITE-92]
Optimize away
- Algorithms
- [CALCITE-451] Implement theta join, inner and outer, in enumerable convention
- [CALCITE-489]
Update
Correlatemechanics and implementEnumerableCorrelate(aka nested loops join) - [CALCITE-544]
Implement
Unionin interpreter - [CALCITE-562]
Implement inner
Joinin interpreter and improve handling of scalar expressions - [CALCITE-543]
Implement
Aggregate(includingGROUPING SETS) in interpreter (Jacques Nadeau) - In progress towards
[CALCITE-558]
add
BINDABLEconvention (butENUMERABLEis still the default), and addArrayBindableandScalarinterfaces
- Remote driver
- [CALCITE-93] Calcite RPC server
- [CALCITE-94] Remote JDBC driver
- Make
JsonHandlerandJsonServicethread-safe
API changes
- The great code re-org
- [CALCITE-296] Re-organize package structure
- [CALCITE-419] Naming convention for planner rules
- [CALCITE-306] Standardize code style for “import package.*;”
- [CALCITE-474] Clean up rule naming in order to support enabling/disabling rules
- [CALCITE-460]
Add
ImmutableBitSetand replace uses ofBitSet - [CALCITE-479]
Migrate
RelNode.getChildExpstoRelNode.accept(RexShuttle) - [CALCITE-527]
Drop
rowTypefield and constructor/copy argument ofCalc
- Add linq4j and example-csv modules
- Remove unused packages in linq4j, and fix checkstyle issues in linq4j and csv
- Add calcite-linq4j and calcite-example-csv as POM sub-modules
- Import ‘optiq-csv’ project as ‘example/csv/’, and add Apache headers
- Import ‘linq4j’ project, and add Apache headers
- [CALCITE-478] Move CSV tutorial (Siva Narayanan)
- [CALCITE-464] Make parser accept configurable max length for SQL identifier
- [CALCITE-465]
Remove
OneRowandEmptyrelational expressions;Valueswill suffice
Bug-fixes and internal changes
- Build improvements
- [CALCITE-541] Update maven-source-plugin to 2.4 to get speedup in jdk 1.8
- [CALCITE-537]
Skip overwrite of
NOTICE,DEPENDENCIES, andLICENSEfiles - [CALCITE-538]
Generate
Parser.jjonly at first build - [CALCITE-539]
Avoid rewrite of
org-apache-calcite-jdbc.properties - [CALCITE-540]
Create git.properties file only at first build. This saves time in
development at a cost of stale
git.properties - [CALCITE-536]
Add
@PackageMarkertopackage-info.javaso maven-compiler skips compilation when the sources are unchanged - [CALCITE-535] Support skip overwrite in hydromatic-resource
- [CALCITE-582]
EnumerableTableScanbroken when table has single column - [CALCITE-575]
Variant of
ProjectRemoveRulethat considers a project trivial only if its field names are identical (John Pullokkaran) - [CALCITE-571]
ReduceExpressionsRuletries to reduceSemiJoincondition to non-equi condition - [CALCITE-568]
Upgrade to a version of
pentaho-aggdesignerthat does not pull inservlet-api - [CALCITE-567]
Make
quidemdependency have scope “test” - [CALCITE-570]
ReduceExpressionsRulethrows “duplicate key” exception - [CALCITE-561] Upgrade parent POM
- [CALCITE-458] ArrayIndexOutOfBoundsException when using just a single column in interpreter
- Fix spurious extra row from
FULL JOIN - [CALCITE-554] Outer join over NULL keys generates wrong result
- [CALCITE-489]
Teach
CalciteAssertto respect multiple settings - [CALCITE-516]
GROUP BYon aCASEexpression containingINpredicate fails (Aman Sinha) - [CALCITE-552] Upgrade tpcds (which depends on an old version of guava)
- Copy identifier when fully-qualifying, so column aliases have the right case
- [CALCITE-548]
Extend
inducemethod to returnCUBEandROLLUP(Jesus Camacho Rodriguez)- Simplify
Group.induceby assuming that group sets are sorted
- Simplify
- Test case for
[CALCITE-212]
Join condition with
OR - [CALCITE-550]
Case-insensitive matching of sub-query columns fails
- Add more unit tests (Jinfeng Ni)
- [CALCITE-448]
FilterIntoJoinRulecreates filters containing invalidRexInputRef - When registering a
RelNode, be tolerant if it is equivalent to aRelNodewith different traits - [CALCITE-547]
Set nullability while inferring return type of
item(any,...)operator - In Travis CI, enable containers, and cache
.m2directory - [CALCITE-534]
Missing implementation of
ResultSetMetaData.getColumnClassName(Knut Forkalsrud) - [CALCITE-506]
Update
EnumerableRelImplementor.stashso it is suitable for all kinds of classes - Merge join algorithm for
Enumerables - Efficient
Enumerableover random-access list - Add a test that calls all functions with arguments of all types that they claim to accept
- [CALCITE-511]
copymethod inLogicalAggregatenot copying the indicator value properly - Add a model that has lattices and works against HSQLDB
- [CALCITE-509]
RelMdColumnUniquenessusesImmutableBitSet.Buildertwice, getsNullPointerException - [CALCITE-488]
Enumerable<Holder>does not work if whereHolderis a custom class with a single field; Calcite tries to treat it asSCALARdue to prematureJavaRowFormat.optimize - [CALCITE-352]
Throw exception if
ResultSet.next()is called afterclose() - [CALCITE-403]
EnumerablegivesNullPointerExceptionwithNOTon nullable expression - [CALCITE-469] Update example/csv README.md instructions
- Document
WITH,LATERAL,GROUPING SETS,CUBE,ROLLUP; add descriptions for all built-in functions and operators - [CALCITE-470]
Print warning when column type hint is not understood;
Update
EMPS.deptnocolumn Integer → int - Fix
Linq4j.product; the cartesian product of 0 attributes is one row of 0 attributes - Update link optiq-mat-plugin → mat-calcite-plugin
- [CALCITE-467]
Incorrect namespace in
package-info.java - Add headers, to appease the RAT
- [CALCITE-446] CSV adapter should read from directory relative to the model file
- Add examples of scannable and filterable tables, matching [CALCITE-436] Simpler SPI to query Table
- Fix
JdbcTest.testVersionnow that version is 1.0 - Update release HOWTO
0.9.2-incubating / 2014-11-05
A fairly minor release, and last release before we rename all of the packages and lots of classes, in what we expect to call 1.0. If you have an existing application, it’s worth upgrading to this first, before you move on to 1.0.
New features
- [CALCITE-436]
Simpler SPI to query
Table
API changes
- [CALCITE-447] Change semi-join rules to make use of factories
- [CALCITE-442
Add
RelOptRuleOperandconstructor that takes a predicate
Bug-fixes and internal changes
- [CALCITE-397]
SELECT DISTINCT *on reflective schema givesClassCastExceptionat runtime - Various lattice improvements.
- sqlline: Looking for class-path in inconsistent locations.
- Re-order test suite, so that fast tests are run first.
- [CALCITE-444] Filters wrongly pushed into full outer join
- Make it more convenient to unit test
RelMetadataQuery, and add some more tests for [CALCITE-443] - [CALCITE-443]
getPredicatesfrom a Union is not correct - Update references to web sites, git repositories, jira, mailing lists, travis CI now that [INFRA-8413] is fixed
- [CALCITE-435]
FilterAggregateTransposeRuleloses conditions that cannot be pushed - [CALCITE-435]
LoptOptimizeJoinRuleincorrectly re-orders outer joins - [CALCITE-439]
SqlValidatorUtil.uniquify()may not terminate under some conditions - [CALCITE-438]
Push predicates through
SemiJoinRel - Add test case for
LIKE ... ESCAPE. - HOWTO: Modify release instructions.
- Update
DiffRepositorydocumentation. - Add tests for windowed aggregates without
ORDER BY. (Works already.)
0.9.1-incubating / 2014-10-02
This is the first release as Calcite. (The project was previously called Optiq.)
New features
- [CALCITE-430] Rename project from Optiq to Calcite
- [CALCITE-426] Pool JDBC data sources, to make it easier to pool connections
- [CALCITE-416]
Execute logical
RelNodes using an interpreter - [CALCITE-376]
Move
SqlRuninto its own artifact, Quidem. - [CALCITE-269] MongoDB result sets larger than 16MB
- [CALCITE-373]
NULLvalues inNOT INsub-queries - SQL functions:
- [CALCITE-422]
Add
REGR_SXXandREGR_SYYregression functions - [CALCITE-421]
Add
COVAR_POPandCOVAR_SAMPaggregate functions
- [CALCITE-422]
Add
- Planner rules:
- [CALCITE-425]
Add
FilterAggregateTransposeRule, that pushes a filter through an aggregate - [CALCITE-399]
Factorize common
ANDfactors out ofORpredicates - [CALCITE-404]
MergeProjectRuleshould not constructRexPrograms for simple mappings - [CALCITE-394]
Add
RexUtil.toCnf(), to convert expressions to conjunctive normal form (CNF) - [CALCITE-389]
MergeFilterRuleshould flattenANDcondition
- [CALCITE-425]
Add
- Lattices:
- [CALCITE-428] Use optimization algorithm to suggest which tiles of a lattice to materialize
- [CALCITE-410] Allow lattice tiles to satisfy a query by rolling up
- [CALCITE-406] Add tile and measure elements to lattice model element
- Now, a lattice can materialize an aggregate-join and use it in a subsequent query.
- [CALCITE-402] Lattice should create materializations on demand
- [CALCITE-344] Lattice data structure
- Field trimmer:
- [CALCITE-408]
Make
FieldTrimmerwork withRelNodebase classes - [CALCITE-388] Handle semi-joins in field trimmer
- [CALCITE-395]
Make
FieldTrimmer.trimFields(SetOp)generateProjectRelinstead ofCalcRel - [CALCITE-393] If no fields are projected from a table, field trimmer should project a dummy expression
- [CALCITE-408]
Make
API changes
- [CALCITE-413]
Add
RelDataTypeSystemplugin, allowing different max precision of aDECIMAL - In
Planner, query de-correlation no longer requires state in aSqlToRelConverter. - Factories:
- [CALCITE-392]
RelFieldTrimmershould use factory to create new rel nodes - [CALCITE-382] Refactoring rules to use factories
- [CALCITE-398]
Move
CalcRel.createProjectmethods toRelOptUtil - [CALCITE-396]
Change return type of
JoinFactory.createJoin(); addSemiJoinFactory
- [CALCITE-392]
Bug-fixes and internal changes
- [CALCITE-386] Fix NOTICE
- Add tests inspired by Derby bugs.
- Add recent presentation to README.md.
- [CALCITE-427]
Off-by-one issues in
RemoveDistinctAggregateRule,AggregateFilterTransposeRule - [CALCITE-414]
Bad class name in
sqllineshell script - Bad package name in
package-info.javawas causing errors in Eclipse. - [CALCITE-412]
RelFieldTrimmer: when trimmingSortRel, the collation and trait set don’t match - Add test case for [CALCITE-411] Duplicate column aliases
- [CALCITE-407]
RemoveTrivialProjectRuledrops child node’s traits - [CALCITE-409]
PushFilterPastProjectRuleshould not push filters past windowed aggregates - Fix tests on Windows.
- Don’t load
FoodMartQuerySetunless we have to. It’s big. - Enable connection pooling in test suite.
- [CALCITE-384]
Add
apache-prefix to tarball and directory within tarball - Freeze hive fmpp > freemarker plugin dependency.
- Upgrade Janino
- Removed hardcoded foodmart schema information
- [CALCITE-387] CompileException when cast TRUE to nullable boolean
- Temporary fix for
[CALCITE-390]
Transitive inference (
RelMdPredicates) doesn’t handle semi-join - [CALCITE-385] Change comment style for Java headers
- Disable test that is inconistent between JDK 1.7 and 1.8.
- Fix
git-commit-id-pluginerror when running in Travis-CI. - [CALCITE-381]
Remove plugin versions from the
<plugins>tag in root pom - [CALCITE-383]
Each jar should have a
git.propertiesfile describing its exact version - Fix
mvn siteon JDK 1.8 and enable in Travis-CI. - Status icon based on master branch, not whichever branch happened to build most recently.
- HOWTO:
- Document how to build from git, and how to get jars from maven repo.
- Optiq web site
- Template emails for Apache votes
- Update JIRA cases following release
- Instructions for making and verifying a release
0.9.0-incubating / 2014-08-19
This is the first release under the Apache incubator process.
New features
- [CALCITE-371]
Implement
JOINwhoseONclause contains mixed equi and theta - [CALCITE-369]
Add
EnumerableSemiJoinRel, implementation of semi-join in enumerable convention - Add class
Strong, for detecting null-rejecting predicates. - [CALCITE-368] Add SemiJoinRule, planner rule to convert project-join-aggregate into semi-join
- [CALCITE-367]
PushFilterPastJoinRuleshould strengthen join type - Add
EquiJoinRel, base class for joins known to be equi-joins. - Implement
CAST(<string> AS <datetime>)and<datetime> + <interval>. - [CALCITE-360] Introduce a rule to infer predicates from equi-join conditions
- [CALCITE-349] Add heuristic join-optimizer that can generate bushy joins
- [CALCITE-346] Add commutative join rule
- [CALCITE-347]
In
SqlRun, add!plancommand - [CALCITE-314] Allow simple UDFs based on methods
- [CALCITE-327] Rules should use base class to find rule match & use factory for object creation
- [CALCITE-316]
In
SqlRun, match output regardless of order ifORDER BYnot present - [CALCITE-300]
Support multiple parameters in
COUNT(DISTINCT x, y, ...)
API changes
- [CALCITE-343] RelDecorrelator should build its own mappings, not inherit from SqlToRelConverter
- Remove deprecated methods.
- Convert
Hookto use GuavaFunction(was linq4jFunction1). - Add fluent method
withHook, to more easily add hooks in tests. - [CALCITE-321]
Add support for overriding implementation of
CompoundIdentifierinSqlParser. - [CALCITE-322]
Add support for
SqlExplain,SqlOrderByandSqlWithto supportSqlShuttleuse. - [CALCITE-323]
Override
SqlUnresolvedFunction.inferReturnType()to returnANYtype so framework implementors can support late bound function implementations. - [CALCITE-324]
Add
ViewExpanderforPlannerinFrameworks. Expose additional properties ofViewTableto allow subclassing. - [CALCITE-247]
Add
ContextandFrameworkConfig
Bug-fixes and internal changes
- [CALCITE-380] Downgrade to Guava 11.0.2
- Move several .md files into new ‘doc’ directory, to keep the root directory simple.
- Add DISCLAIMER
- Update history and HOWTO
- [CALCITE-377] UnregisteredDriver should catch, log and re-throw NoClassDefFoundError
- Inherit maven-release-plugin from Apache POM.
- Test case for [CALCITE-373] NOT IN and NULL values
- [CALCITE-372]
Change
LoptOptimizeJoinRule&PushFilterPast* rules to use factory - Upgrade
maven-checkstyle-plugin. - Add class
Holder, a mutable slot that can contain one object. - Remove the 2-minute wait at the top of the hour for tests of
CURRENT_TIME, etc. - Tune
ImmutableIntList’s iterators. - [CALCITE-364]
Validator rejects valid
WITH ... ORDER BYquery - [CALCITE-363]
Use
dependencyManagementandpluginManagementin POM files - Add
FilterFactory. - Add
READMEfile, incubation disclaimers, and how-to build and running tests. - Add
KEYSand start how-to for making snapshots and releases. - Capital case component names; inherit license info from Apache parent POM.
- Only run
apache-ratandgit-commit-id-pluginin “release” maven profile. - [CALCITE-348] Add Apache RAT as maven plugin
- Change license headers from “Julian Hyde” to “ASF”; add headers where missing.
- Fix build breakage on JDK 1.6 due to missing method
BitSet.previousClearBit. - Refactor test infrastructure to allow testing against heuristic bushy-join optimizer.
- Add methods and tests for BitSets, and re-organize tests.
- [CALCITE-354] Change maven groupId to “org.apache.optiq”
- Specify return type when calling
RexBuilder.makeCall, if possible. - Eliminate duplicate conditions in
RexProgramBuilder.addCondition, notRexBuilder.makeCallas previously. - [CALCITE-345]
AssertionErrorinRexToLixTranslatorcomparing to date literal - Restore
PushFilterPastJoinRuletoRelDecorrelator; interim pending [CALCITE-343] fix. - [CALCITE-340]
Fix bug in
SqlToRelConverterwhen push expressions in join conditions intoProjectRel. - [CALCITE-313] Query decorrelation fails
- While unifying a
RelNodetree with a materialized view expression, switch representation toMutableRels. - [CALCITE-305] Unit test failure on release candidates
- [CALCITE-325]
Use Java list instead of Guava list to avoid null checks in case of
SqlTypeExplicitPrecedenceList. - [CALCITE-326]
Fix
RelOptUtilANYtype check. - [CALCITE-303] Migrate issue URLs
- [CALCITE-331]
Precision/scale compatibility checks should always succeed for
ANYtype - In
SqlRun, allow!planafter!okfor same SQL statement. - [CALCITE-318]
Add unit test for
SqlRun - Fix a bug where composite
SELECT DISTINCTwould return duplicate rows.
0.8 / 2014-06-27
New features
- [CALCITE-310] Implement LEAD, LAG and NTILE windowed aggregates
- Reduce
COUNT(not-null-expression)toCOUNT() - [CALCITE-292] Improve windowed aggregate return types
- [CALCITE-302] Use heuristic rule to plan queries with large numbers of joins
- [CALCITE-283] Add TPC-DS data generator
- [CALCITE-294] Implement DENSE_RANK windowed aggregate function
- SqlRun utility
- [CALCITE-290]
Add
SqlRun, an idempotent utility for running SQL test scripts - Add “!skip” command to SqlRun.
- Add MySQL formatting mode to SqlRun.
- [CALCITE-290]
Add
API changes
- Re-organize planner initialization, to make it easier to use heuristic join order.
- [CALCITE-301]
Add
Programinterface, a planner phase more general than currentRuleSet - [CALCITE-263] Add operand type that will cause a rule to fire when a new subset is created
- Clean up and document SqlKind.
- Add
IS_NOT_TRUEandIS_NOT_FALSESqlKindenums. - Add
SqlKind.IS_NOT_NULLenum value, and use where possible, including forIS_NOT_UNKNOWNoperator.
- Add
Bug-fixes and internal changes
- [CALCITE-312]
Trim non-required fields before
WindowRel - [CALCITE-311] Wrong results when filtering the results of windowed aggregation
- More tests for
WITH ... ORDER BY - [CALCITE-309]
WITH ... ORDER BYquery givesAssertionError - Enable
MultiJoinReland some other planner rule tests. - Add
ImmutableNullableListandUnmodifiableArrayList, and remove calls toArrays.asList. - Add method
IntPair.zip. - Reimplement regular and windowed aggregates
- Switch from github to Apache JIRA for issues tracking.
- In release history, update issue URLs from github to Apache JIRA
- The Apache mailing list is now the official mailing list. Add presentations.
- Add test for overloaded UDF.
- Add tests for
NOT INwhere sub-query returns NULL values. - [CALCITE-288] Add tests for windowed aggregation based on Postgres reference queries
- [CALCITE-286] Error casting MongoDB date
- [CALCITE-284]
Window functions range defaults to
CURRENT ROW - [CALCITE-285]
Window functions throw exception without
ORDER BY - Test case for [<a href=“https://issues.apache.org/jira/browse/CALCITE-285”>CALCITE-285</a>].
- [CALCITE-281]
EXTRACTfunction’s SQL return type isBIGINTbut implemented as Javaint
0.7 / 2014-05-13
New features
- Implement table functions.
- Arrays and multi-sets:
- [CALCITE-267] Improve support for ARRAY data type
- Better type information for JDBC Array; nested array now possible.
- Implement
JOIN LATERALandJOIN UNNEST. - Implement the
UNNESTrelational operator, and various improvements toARRAYandMULTISETdata types. - Represent
ARRAYcolumns as Java lists. - Implement
CARDINALITY(ARRAY)SQL operator.
- Implement scalar sub-query in
SELECTclause. - [CALCITE-273] Support column alias in WITH queries (common table expressions)
- Windowed aggregates:
- Aggregate over constants, e.g.
SUM(1) OVER (ROWS 10 PRECEDING); -
UNBOUNDED PRECEDINGwindow range; - Windowed aggregates computed over primitive scalars.
- Aggregate over constants, e.g.
- Fix return type inference for aggregate calls. If the
GROUP BYclause is empty,SUMmay return null. - [CALCITE-37] Document JSON model file format (as model.md).
- [CALCITE-238] Add adapter that generates TPC-H data
- Improve exception message in
AvaticaConnection; addExceptionMessageTest. - Implement micro-benchmarks via JMH.
API changes
- Provide an option to create root schema without the “metadata” schema.
- Schema SPI:
- [CALCITE-175] Modify Schema SPI to allow caching
- Get sub-schemas defined by a Schema SPI, and cache their
OptiqSchemawrappers. (Tobi Vollebregt and Julian Hyde)
- SqlAdvisor callable from client via JDBC.
Bug-fixes and internal changes
- Add Apache incubator proposal.
- Rename RELEASE.md to HISTORY.md.
- Upgrade maven-release-plugin.
- Upgrade to linq4j-0.3.
- Code generation improvements:
- Move code-generation optimizer to linq4j;
- Improve translation of strict functions;
- Mark most methods in
SqlFunctionsas@Deterministic; - Support
static finalconstants generated by linq4j. - Avoid excessive box and unbox of primitives when using
Object[]storage. - In JDBC result set, avoid row computation on each accessor call.
- Test composite join conditions in various flavors of outer join.
- Use
fromTraitof the just previously convertedRelNodeinstead of the originalRelNode. - Disable a MongoDB test, pending [CALCITE-270].
- Hush warnings from
SplunkAdapterTestif Splunk is not available. - [CALCITE-252] Scalar sub-query that returns 0 rows should become NULL value
-
SplunkAdapterTestnow uses the same Foodmart database asJdbcTest. - [CALCITE-242] SplunkAdapterTest fails
- Remove some obsolete classes.
- [CALCITE-205] Suspicious map.get in VolcanoPlanner.reregister
0.6 / 2014-04-11
New features
- [CALCITE-214]
Modify Frameworks to allow Schema to be re-used
Obsoletes
namefield ofReflectiveSchema. - [CALCITE-237] Allow user-defined aggregate functions (UDAs) to be defined in a model
- [CALCITE-227]
Extend
EXTRACTfunction to supportDATE,TIMEandTIMESTAMPvalues - [CALCITE-222] User-defined table macros
- [CALCITE-179]
Optiq on Windows
- Add
sqlline.batand fix issues runningsqllineunder Cygwin.
- Add
- [CALCITE-195] Push aggregation into MongoDB adapter
- [CALCITE-193] Implement OFFSET and LIMIT in MongoDB adapter
- [CALCITE-164] Improve query performance of optiq over MongoDB
- Add Phoenix (HBase) SQL dialect (Bruno Dumon)
API changes
- Obsolete
RexImpTable.AggregateImplementorand renameAggImplementor2. (This is a breaking change.) - Convert
CombinedParser.jjinto freemarker template to allow custom parser implementations. (Venki Korukanti) - Extend
Plannerto pass a customConvertletTableand custom SQL parser. - In
Frameworks, add a way to specify list ofTraitDefs that will be used by planner. (Jinfeng Ni) - [CALCITE-198]
Use
RexExecutorto evaluate projections and filters - [CALCITE-219]
Parse
ALTER scope SET option = valuestatement - [CALCITE-215] A Schema should not have to remember its name and parent (This is a breaking change.)
- [CALCITE-180] Common base class for TableFunction, ScalarFunction (This is a breaking change.)
- Add methods for dealing with symbols; deprecate
SqlLiteral.booleanValue(SqlNode),SqlLiteral.symbolValue(SqlNode). - Add
RelOptPlanner.clear(); now it is safe to calltransformtwice. (Jinfeng Ni) - Remove APIs deprecated for 0.5.
- Move around some operator classes and singletons.
Bug-fixes and internal changes
- Upgrade to linq4j-0.2.
-
FETCHandLIMITare ignored during SQL-to-RelNode translation. (Venki Korukanti) - [CALCITE-245] Off-by-one translation of ON clause of JOIN
- [CALCITE-191] Rotate time/date/timestamp vals to local timezone
- [CALCITE-244]
RelOptTableImpl.createalways expectsQueryableTabletype inOptiqSchema.TableEntry - [CALCITE-225] Optiq doesn’t correctly decorrelate queries
- Clean up package-info. Remove duplicates in test packages so they don’t conflict with those in non-test packages.
- Add
Pair.adjacents(Iterable). - [CALCITE-199]
Various
ANYtype conditions aren’t correctly being considered (Jacques Nadeau) - Add files to
.gitignorethat shouldn’t be checked in when using Eclipse. (Jacques Nadeau) - Add class
ControlFlowException, and make it base class of existing control-flow exception classes. - [CALCITE-232] Sum and avg of empty set should be null as per SQL specification
- Add
SqlUnresolvedFunction, to improve how return type of user-defined functions is resolved. (Vladimir Sitnikov) - [CALCITE-228] Error while compiling generated Java code when using UDF in expression
- [CALCITE-226] User-defined functions should work without explicit schema prefix
- [CALCITE-229] Join between different JDBC schemas not implementable
- [CALCITE-230] RemoveSortRule derives trait set from sort, should derive it from sort’s child
- Test view and sub-query with
ORDER BYandLIMIT. - [CALCITE-223]
Add
NOTICEandLICENSEfiles in all generated JAR files - [CALCITE-209]
Consistent strategy for line-endings in tests
Convert uses of
NLin tests to Linux newline “\n”. This makes string constants simpler. - [CALCITE-218]
Functions case sensitive when using
Lex.MYSQL - Add tests that a query with aggregate expressions in the
SELECTclause is considered an aggregate query, even if there is noGROUP BY. - [CALCITE-216] Inconsistent use of provided operator table causes inability to add aggregate functions
- [CALCITE-200] Javadoc generation fails under JDK 1.8
- Add class
XmlOutput(based onorg.eigenbase.xom.XMLOutput) and remove dependency on eigenbase-xom. - Performance: Don’t create stack-trace for exceptions used for control-flow. (Vladimir Sitnikov)
- Performance: Tune
RexProgramBuilderby usingPairrather thanStringas expression key. (Vladimir Sitnikov) - Fix NPE using TRIM function with JDBC. (Bruno Dumon)
- Add dependency on hydromatic-resource-maven-plugin and obsolete our copy of the resource framework.
- Fix race condition in
SpaceList. - In planner, use
RelTrait.subsumesrather thanequalsin an assert. (Jinfeng Ni)
0.5 / 2014-03-14
New features
- Allow
quoting,quotedCasing,unquotedCasing, andcaseSensitiveproperties to be specified explicitly (Vladimir Sitnikov) - Recognize more kinds of materializations, including filter-on-project (where project contains expressions) and some kinds of aggregation.
- [CALCITE-128]
Support
WITHqueries (common table expressions) - [CALCITE-53]
Allow
WHENclause in simpleCASEexpression to have multiple values - [CALCITE-156] Optiq should recognize ‘SYSTEM TABLE’, ‘JOIN’, ‘INDEX’ as table types
- Support querying ARRAY columns from JDBC source. (Gabriel Reid)
API changes
- Add
ProjectRelBase.copy(RelTraitSet, RelNode, List<RexNode>, RelDataType)and makeProjectRelBase.copy(RelTraitSet, RelNode)final. (This is a breaking change for sub-classes ofProjectRelBase.) - Change
RexBuilder.makeRangeReferenceparameter type. -
RexBuilder.makeInputRefreplacesRelOptUtil.createInputRef. - [CALCITE-160] Allow comments in schema definitions
- [CALCITE-147]
Create a new kind of
SqlCallthat keeps operands in fields, not an operands array- Very widely used parse tree nodes with complex operands, including
SqlSelect,SqlJoin,SqlInsert, and a new node typeSqlOrderBy, are now sub-classes ofSqlCallbut notSqlBasicCall. - (This is a breaking change to code that assumes that, say,
SqlSelecthas anoperandsfield.)
- Very widely used parse tree nodes with complex operands, including
- Convert all enum constants to upper-case. (This is a breaking change.)
Bug-fixes and internal changes
- Generate optiq-core-VERSION-tests.jar not parent-VERSION-tests.jar.
- [CALCITE-176] ORDER BY expression doesn’t work with SELECT *
- Fix VARCHAR casts sent to hsqldb source (Bruno Dumon)
- [CALCITE-143] Remove dependency on eigenbase-resgen
- [CALCITE-173]
Case-insensitive table names are not supported for
Casing.UNCHANGED -
DATE.getLimitnow returnsCalendarin GMT time zone (Vladimir Sitnikov) - Set
en_USlocale in tests that match against error numbers, dates (Vladimir Sitnikov) - Use 1 test thread per CPU to avoid thread starvation on dual core CPUs (Vladimir Sitnikov)
- [CALCITE-174] Move hsqldb to test scope
- Add unit tests for
RexExecutorImpl. - Correct JSON model examples in Javadoc comments. (Karel Vervaeke)
- Move test reference logs from
src/test/javatosrc/test/resources(reduces the number of ‘untracked files’ reported by git) - Tune
Util.SpaceList, fix race condition, and move into new utility classSpaces. - [CALCITE-163] Equi-join warning
- [CALCITE-157]
Handle
SQLFeatureNotSupportedwhen callingsetQueryTimeout(Karel Vervaeke) - Fix Optiq on Windows. (All tests and checkstyle checks pass.)
- In checkstyle, support Windows-style file separator, otherwise build fails in Windows due to suppressions not used. (Vladimir Sitnikov)
- Enable MongoDB tests when
-Dcalcite.test.mongodb=true. - Cleanup cache exception-handling and an assert.
- [CALCITE-153] Error using MongoDB adapter: Failed to set setXIncludeAware(true)
- Disable spark engine unless Spark libraries are on the class path and
spark=trueis specified in the connect string. - Fix path to
mongo-zips-model.jsonin HOWTO. (Mariano Luna) - Fix bug deriving the type of a join-key.
- Fix the value of
ONE_MINUS_EPSILON. - [CALCITE-158]
Optiq fails when call
Planner.transform()multiple times, each with different ruleset - [CALCITE-148]
Less verbose description of collation. Also, optimize
RelTraitSetcreation and amortizeRelTraitSet.toString(). - Add generics to SQL parser.
- [CALCITE-145] Unexpected upper-casing of keywords when using java lexer
- Remove duplicate
maven-source-plugin. - [CALCITE-141] Downgrade to guava-11.0.2. (This is necessary for Hadoop compatibility. Later versions of Guava can also be used.)
- Upgrade to spark-0.9.0. (Because this version of spark is available from maven-central, we can make optiq-spark part of the regular build, and remove the spark profile.)
0.4.18 / 2014-02-14
API and functionality changes
- Configurable lexical policy
- [CALCITE-33] SQL parser should allow different identifier quoting
- [CALCITE-34] Policy for case-sensitivity of identifiers should be configurable
- New connect-string parameter “lex”, with allowable values “ORACLE”, “MYSQL”, “SQL_SERVER”, “JAVA” sets policy to be like those databases, in terms of quote string, whether quoted and unquoted identifiers are converted to upper/lower case, and whether identifiers are matched case-sensitively. “JAVA” is case-sensitive, even for unquoted identifiers. It should be possible for each connection to have its own settings for these. Objects shared between sessions (views, materialized views) might require more work.
- Added various internals to make it easy for developers to do the right thing. When you need to look up a schema, table or column/field name, you should use a catalog reader, and it will apply the right case-sensitivity policy.
- Enable optiq consumer to utilize different lexical settings in Frameworks/Planner. (Jacques Nadeau)
- [CALCITE-115] Add a PARSE_TREE hook point with SqlNode parameter
- Change planner rules to use
ProjectFactoryfor creating projects. (John Pullokkaran) - [CALCITE-131] Add interfaces for metadata (statistics) (This is a breaking change.)
- Update Avatica to allow
Cursor&Accessorimplementations to throwSQLException. (Jacques Nadeau) - Separate cost model (
RelOptCostFactory) from planner. AllowVolcanoPlannerto be sub-classed with different cost factory.- Remove references to VolcanoCost from RelSubset, so clients can
use a different
RelOptCost. (Harish Butani) - Make
VolcanoCostimmutable.
- Remove references to VolcanoCost from RelSubset, so clients can
use a different
- Break
SqlTypeStrategiesintoOperandTypes,ReturnTypesandInferTypes, and rename its static members to upper-case, per checkstyle. (This is a breaking change.) - Add a mechanism for defining configuration parameters and have them
appear in the responses to
AvaticaDatabaseMetaDatamethods. - [CALCITE-113] User-defined scalar functions
- Add rules to short-cut a query if
LIMIT 0is present. Also remove sort, aggregation, join if their inputs are known to be empty, and propagate the fact that the relational expressions are known to be empty up the tree. (We already do this for union, filter, project.) -
RexNodeand its sub-classes are now immutable.
Bug-fixes and internal changes
- [CALCITE-16] Upgrade to janino-2.7
- Upgrade to guava-15.0 (guava-14.0.1 still allowed), sqlline-1.1.7, maven-surefire-plugin-2.16, linq4j-0.1.13.
- [CALCITE-136] Support Hive dialect
- [CALCITE-138] SqlDataTypeSpec.clone handles collection types wrong
- [CALCITE-137]
If a subset is created that is subsumed by an existing subset, its
‘best’ is not assigned
- If best rel in a Volcano subset doesn’t have metadata, see if other rels have metadata.
- [CALCITE-127] EnumerableCalcRel can’t support 3+ AND conditions (Harish Butani)
- Fix push-down of datetime literals to JDBC data sources.
- Add
Util.startsWith(List, List)andUtil.hashCode(double). - Add maven-checkstyle-plugin, enable in “verify” phase, and fix exceptions.
- Fix
SqlValidatorto rely onRelDataTypeto do field name matching. FixRelDataTypeImplto correctly use the case sensitive flag rather than ignoring it. - [CALCITE-119] Comparing Java type long with SQL type INTEGER gives wrong answer
- Enable multi-threaded testing, and fix race conditions.
- Two of the race conditions involved involving trait caches. The other was indeterminacy in type system when precision was not specified but had a default; now we canonize TIME to TIME(0), for instance.
- Convert files to
us-ascii. - Work around [JANINO-169].
- Refactor SQL validator testing infrastructure so SQL parser is configurable.
- Add
optiq-mat-pluginto README. - Fix the check for duplicate subsets in a rule match.
- [CALCITE-112] Java boolean column should be treated as SQL boolean
- Fix escaped unicode characters above 0x8000. Add tests for unicode strings.
0.4.17 / 2014-01-13
API changes
- [CALCITE-106]
Make
SchemaandTableSPIs simpler to implement, and make them re-usable across connections (This is a breaking change.) - Make it easier to define sub-classes of rule operands. The new class
RelOptRuleOperandChildrencontains the children of an operand and the policy for dealing with them. Existing rules now use the new methods to construct operands:operand(),leaf(),any(),none(),unordered(). The previous methods are now deprecated and will be removed before 0.4.18. (This is a breaking change.) - [CALCITE-101] Enable phased access to the Optiq engine
- List-handling methods in
Util: add methodsskipLast,last,skip; removesubList,butLast. - Convert
SqlIdentifier.namesfromString[]toImmutableList<String>. - Rename
OptiqAssert.assertThat()tothat(), to avoid clash with junit’sAssert.assertThat(). - Usability improvements for
RelDataTypeFactory.FieldInfoBuilder. It now has a type-factory, so you can just callbuild(). - Rework
HepProgramBuilderinto a fluent API. - [CALCITE-105] Externalize RelNode to and from JSON
Tuning
- If
EnumerableAggregateRelhas no aggregate functions, generate a call toEnumerable.distinct(), thereby saving the effort of building trivial accumulators. - Default rule set now does not introduce
CalcReluntil a later phase of planning. This reduces the number of trivial projects and calcs created, merged, and elimated. - Reduce the amount of time spent creating record types that already exist.
- More efficient implementation of
Util.isDistinctfor small lists. - When an internal record has 0 fields, rather than generating a
synthetic class and lots of instances that are all the same, use the
new
Unitclass, which is a singleton. - To take advantage of asymmetric hash join added recently in linq4j,
tweak cost of
EnumerableJoinRelso that join is cheaper if the larger input is on the left, and more expensive if it is a cartesian product. - [CALCITE-70] Joins seem to be very expensive in memory
- Make planning process more efficient by not sorting the list of
matched rules each cycle. It is sorted if tracing is enabled;
otherwise we scan to find the most important element. For this list,
replace
LinkedListwithChunkList, which has an O(1) remove and add, a fast O(n) get, and fast scan.
Other
- [CALCITE-87]
Constant folding
- Rules for constant-expression reduction, and to simplify/eliminate
VALUESoperator.
- Rules for constant-expression reduction, and to simplify/eliminate
- Graph algorithms: Implement breadth-first iterator and cycle-detector.
- Fix bug in planner which occurred when two
RelNodes have identical digest but different row-type. - Fix link to optiq-csv tutorial.
- Fix bugs in
RemoveTrivialProjectRule.strip,JdbcProjectRel.implementandSortRel.computeSelfCost. - Reformat code, and remove
@authortags. - Upgrade to eigenbase-xom-1.3.4, eigenbase-properties-1.1.4, eigenbase-resgen-1.3.6.
- Upgrade to linq4j-0.1.12.
- [CALCITE-97] Correlated EXISTS
- Fix a bug in
VolcanoCost. - Add class
FoodMartQuerySet, that contains the 6,700 foodmart queries. - Fix factory class names in
UnregisteredDriver - [CALCITE-96] LIMIT against a table in a clone schema causes UnsupportedOperationException
- Disable spark module by default.
- Allow
CloneSchemato be specified in terms of url, driver, user, password; not just dataSource. - Wrap internal error in
SQLException.
0.4.16 / 2013-11-24
- [CALCITE-69] Can’t join on string columns and other problems with expressions in the join condition
- [CALCITE-74] JOIN … USING fails in 3-way join with UnsupportedOperationException.
- [CALCITE-65] Fix issues in the JDBC driver, and in particular to DatabaseMetaData methods, to make Squirrel-SQL run better.
- Fix JDBC column, table, schema names for when the table is not in a schema of depth 1.
- [CALCITE-85] Adding a table to the root schema causes breakage in OptiqPrepareImpl
- [CALCITE-84] Extract Optiq’s JDBC driver as a new JDBC driver framework, Avatica. Other projects can use this to implement a JDBC driver by implementing just a few methods. If you wish to use Optiq’s JDBC driver, you will now need to include optiq-avatica.jar in addition to optiq-core.jar. Avatica does not depend on anything besides the standard Java library.
- Support for parameters in PreparedStatement.
- First steps in recognizing complex materializations. Internally we introduce a concept called a “star table”, virtual table composed of real tables joined together via many-to-one relationships. The queries that define materializations and end-user queries are canonized in terms of star tables. Matching (not done yet) will then be a matter of looking for sort, groupBy, project. It is not yet possible to define a star in an Optiq model file.
- Add section to HOWTO on implementing adapters.
- Fix data type conversions when creating a clone table in memory.
- Fix how strings are escaped in JsonBuilder.
- Test suite now depends on an embedded hsqldb database, so you can run
mvn testright after pulling from git. You can instead use a MySQL database if you specify ‘-Dcalcite.test.db=mysql’, but you need to manually populate it. - Fix a planner issue which occurs when the left and right children of join are the same relational expression, caused by a self-join query.
- [CALCITE-76]
Precedence of the item operator,
map[index]; remove the space before ‘[’ when converting parse tree to string. - Allow
CAST(expression AS ANY), and fix an issue with the ANY type and NULL values. - Handle null timestamps and dates coming out of JDBC adapter.
- Add
jdbcDriverattribute to JDBC schema in model, for drivers that do not auto-register. - Allow join rules to match any subclass of JoinRelBase.
- Push projects, filters and sorts down to MongoDB. (Fixes [CALCITE-57], [CALCITE-60] and [CALCITE-72].)
- Add instructions for loading FoodMart data set into MongoDB, and how to enable tracing.
- Now runs on JDK 1.8 (still runs on JDK 1.6 and JDK 1.7).
- Upgrade to junit-4.11 (avoiding the dodgy junit-4.1.12).
- Upgrade to linq4j-0.1.11.
0.4.15 / 2013-10-14
- Lots of good stuff that this margin is too small to contain. See SQL language reference and JSON model reference.
Optiq-csv release history
Optiq-csv-0.3 was the last independent release of optiq-csv. From calcite-0.9.2 onwards, the code was included as the calcite-example-csv module.
- Upgrade to calcite-0.9.1
- Support gzip-compressed CSV and JSON files (recognized by ‘.gz’ suffix)
- Cleanup, and fix minor timezone issue in a test
- Support for date types (date, time, timestamp) (Martijn van den Broek)
- Upgrade to optiq-0.8, optiq-avatica-0.8, linq4j-0.4
- Add support for JSON files (recognized by ‘.json’ suffix)
- Upgrade maven-release-plugin to version 2.4.2
- Upgrade to optiq-0.6, linq4j-0.2
- Add NOTICE and LICENSE files in generated JAR file
0.3 / 2014-03-21
- Upgrade to optiq-0.5
- Add workaround to
[JLINE2-62]
to
sqlline.bat(windows) andsqlline(windows using cygwin) - Fix classpath construction:
sqlline.batcopies dependencies totarget/dependencies;sqllineconstructstarget/classpath.txt - Build, checkstyle and tests now succeed on windows (both native and cygwin)
- Models can now contain comments
- [OPTIQ-CSV-2] Update tutorial to reflect changes to Optiq’s JDBC adapter
0.2 / 2014-02-18
- Add test case for [CALCITE-112]
- Add
sqlline.bat, Windows SQL shell (based on fix for [DRILL-338]) - Upgrade to optiq-0.4.18, sqlline-1.1.7
- Return a single object for single-col enumerator (Gabriel Reid)
- Enable maven-checkstyle-plugin; fix checkstyle exceptions
0.1 / 2014-01-13
- Add release notes and history
- Enable maven-release-plugin
- Upgrade to optiq-0.4.17, linq4j-0.1.12, sqlline-1.1.6
- Upgrade tutorial for new Schema and Table SPIs
- Fixes for optiq SPI changes in [CALCITE-106]
- Enable oraclejdk8 in Travis CI
- Fix bug where non-existent directory would give NPE; instead print warning
- Add an example of a planner rule
- Add
CsvTableFactory, an example of a custom table - Add a view to tutorial
- Split into scenario with a “simple” schema that generates tables
(
CsvTable) that just execute and a “smart” schema that generates tables (CsvSmartTable) that undergo optimization - Make
CsvEnumeratora top-level class - Implement the algorithms to sniff names and types from the first row, and to return an enumerator of all rows
- Read column types from header of CSV file
Linq4j release history
Linq4j-0.4 was the last independent release of linq4j. From calcite-0.9.2 onwards, the code was included as calcite-linq4j, and features added to linq4j in a particular calcite release are described with the other changes in that release.
0.4 / 2014-05-28
- Fix #27, “Incorrectly inlines non-final variable”.
- Maven build process now deploys web site.
- Implement
Enumerablemethods:any,all,containswithEqualityComparer,first,firstwith predicate.
0.3 / 2014-04-21
- Move optimizer visitor from optiq to linq4j; add
ExpressionType.modifiesLvalueto avoid invalid inlining. - Fix #17,
“Assign constant expressions to ‘static final’ members”;
add
@Deterministicannotation to help deduce which expressions are constant. - Multi-pass optimization: some of the variables might be avoided and inlined after the first pass.
- Various other peephole optimizations:
Boolean.valueOf(const), ‘not’ expressions (!const,!!a,!(a==b),!(a!=b),!(a>b), etc.), ‘?’ expressions coming fromCASE(a ? booleanConstant : banda ? b : booleanConstant). - Implement left, right and full outer join.
- Clean build on cygwin/Windows.
0.2 / 2014-04-11
- Fix #8, “Javadoc generation fails under JDK 1.8”.
- Fix #15,
“
Expressions.ifThenElsedoes not work”. - Use
HashMapfor searching of declarations to reuse; consider bothoptimizingandoptimizeflags when reusing. - Implement
equalsandhashCodefor expressions. Hash codes for complex expressions are cached into a field of the expression. - Add example,
com.example.Linq4jExample. - Fix optimizing away parameter declarations in assignment target.
- Support Windows path names in checkstyle-suppresions.
- Support
Statement.toStringviaExpressionWriter. - Use
AtomicIntegerfor naming ofParameterExpressions to avoid conflicts in multithreaded usage - Cleanup: use
Functions.adaptrather thannew AbstractList - Add
NOTICEandLICENSEfiles in generated JAR file. - Optimize
select()if selector is identity. - Enable checkstyle.
0.1.13 / 2014-01-20
- Remove spurious “null” generated when converting expression to string.
- Allow a field declaration to not have an initializer.
- Add
Primitive.defaultValue. - Enable
oraclejdk8in Travis CI.
0.1.12 / 2013-12-07
- Add release notes.
- Fix implementation of
Enumerable.asEnumerableinDefaultQueryable(inherited by most classes that implementQueryable).
0.1.11 / 2013-11-06
- Initial commit