Deprecated API
Contents
-
InterfaceDescriptionUse
RelFactories.JoinFactory
instead.As of release 1.19, replaced byCalciteSystemProperty
-
ClassDescriptionUse
SetOpNode
As of 1.19, if you need to perform certain assertions regarding a RelNode tree and the contained traits you are encouraged to implement your own RelVisitor orRelShuttle
directly. The reasons for deprecating this class are the following:- The contract (Javadoc and naming) and the behavior of the class are inconsistent.
- The class is no longer used by any other components of the framework.
- The class was used only for debugging purposes.
As of 1.30.0, if you need to know how tables in a plan are accessed you are encouraged to implement your own logic (using a RelNode visitor or other). The class is not used anywhere in the project and remains untested thus it is deprecated.NowPlannerImpl
implementsRelOptTable.ViewExpander
directly.This class is no longer needed; if you are writing a sub-class of Join that only accepts equi conditions, it is sufficient that it extendsJoin
. It will be evident that it is an equi-join when itsJoinInfo.nonEquiConditions
is an empty list.UseRelMetadataQuery
.org.apache.calcite.rel.core.RelFactories.TableScanFactoryImpl
has calledRelOptTable.toRel(RelOptTable.ToRelContext)
.UseRelDataTypeField::getIndex
UseRelDataTypeField::getName
Now Calcite is Java 8 and higher, we recommend that you implementPredicate
directly.UseSqlLibraryOperatorTableFactory.getOperatorTable(SqlLibrary...)
instead, passingSqlLibrary.ORACLE
as argument.
-
EnumDescriptionUse
org.apache.calcite.avatica.SqlState
-
MethodDescriptionremove before Calcite 2.0Use
PhysType.convertTo(Expression, JavaRowFormat)
. The use of PhysType as a second parameter is misleading since only the row format of the expression is affected by the conversion. Moreover it requires to have at hand a PhysType object which is not really necessary for achieving the desired result.use NameMapuse NameSetUseLists.transform(java.util.List<F>, com.google.common.base.Function<? super F, ? extends T>)
UseLists.transform(java.util.List<F>, com.google.common.base.Function<? super F, ? extends T>)
andArrays.asList(Object[])
FortraitSetOf(t1, t2)
, useRelOptCluster.traitSet()
().replace(t1).replace(t2).UseRelOptPlanner.getCost(RelNode, RelMetadataQuery)
or, better, callRelMetadataQuery.getCumulativeCost(RelNode)
.Previously, this method installed the cancellation-checking flag for this planner, but is now deprecated. Now, you should add aCancelFlag
to theContext
passed to the constructor.UseRelMetadataQuery
.Provide the expected clauses up-front, when you callSqlImplementor.visitInput(RelNode, int, Set)
, then create a builder usingSqlImplementor.Result.builder(RelNode)
.UseRelMetadataQuery
viaRelOptNode.getCluster()
.UsegetColumnPairs().size()
org.apache.calcite.rel.type.RelDataTypeFactoryImpl.useDoubleMultiplication(RelDataType, RelDataType) Replaced byRelDataTypeSystem.getMaxScale(org.apache.calcite.sql.type.SqlTypeName)
(DECIMAL).From Calcite release 1.38 onwards, instead of calling this method, you should call
getMaxPrecision(DECIMAL)
.In Calcite release 1.38, if you wish to change the maximum precision of
SqlTypeName.DECIMAL
values, you should do two things:- Override the
RelDataTypeSystem.getMaxPrecision(SqlTypeName)
method, changing its behavior forDECIMAL
; - Make sure that the implementation of your
#getMaxNumericPrecision
method callsgetMaxPrecision(DECIMAL)
.
In Calcite release 1.39, Calcite will cease calling this method, and will remove the override of the method in
RelDataTypeSystemImpl
. You should remove all calls to and overrides of this method.Replaced byRelDataTypeSystem.getMaxScale(org.apache.calcite.sql.type.SqlTypeName)
(DECIMAL).From Calcite release 1.38 onwards, instead of calling this method, you should call
getMaxScale(DECIMAL)
.In Calcite release 1.38, if you wish to change the maximum scale of
SqlTypeName.DECIMAL
values, you should do two things:- Override the
RelDataTypeSystem.getMaxScale(SqlTypeName)
method, changing its behavior forDECIMAL
; - Make sure that the implementation of your
#getMaxNumericScale
method callsgetMaxScale(DECIMAL)
.
In Calcite release 1.39, Calcite will cease calling this method, and will remove the override of the method in
RelDataTypeSystemImpl
. You should remove all calls to and overrides of this method.UseRexBuilder.makeNullLiteral(RelDataType)
, which produces a NULL of the correct typeUse methods with aRexUnknownAs
argument, such asRexSimplify.simplify(RexNode, RexUnknownAs)
.Create aRexSimplify
, then call itsRexSimplify.simplify(RexNode, RexUnknownAs)
method.Create aRexSimplify
, then call itsRexSimplify.simplify(RexNode, RexUnknownAs)
method.UseRexSimplify.simplifyAnds(Iterable, RexUnknownAs)
.UseRexSimplify.simplifyPreservingType(RexNode)
, which allows you to specify anRexExecutor
.this installs a global hook (cross-thread), so it might have greater impact than expected. Use with caution. Prefer thread-local hooks.UseHook.add(Consumer)
.UseHook.propertyJ(V)
.UseSqlOperator.reverse()
, but beware that it has slightly different semanticsThis property is deprecated, and has no effect. All non-standard time units are now parsed as identifiers, and resolved in the validator. You can define custom time frames usingRelDataTypeSystem.deriveTimeFrameSet(TimeFrameSet)
. To alias a time frame, useTimeFrameSet.Builder.addAlias(String, String)
.Useconfig
, and modify it using its mutator methodsthis method is not localized for Farrago standardsDoes not parse SQL:99 millisecondsthis method is not localized for Farrago standardsReplaced bySqlDialectFactory
To be removed without replacementThis method is no longer used. To change how the dialect unparses offset/fetch, override theSqlDialect.unparseOffsetFetch(org.apache.calcite.sql.SqlWriter, org.apache.calcite.sql.SqlNode, org.apache.calcite.sql.SqlNode)
method.Please useSqlNode.clone(SqlNode)
; this method brings along too much baggage from early versions of JavaUseRelDataTypeSystem.getDefaultScale(SqlTypeName)
but return Integer.MIN_VALUE if scale is unsupported.UseRelDataTypeSystem.getMinScale(SqlTypeName)
but return Integer.MIN_VALUE if scale is unsupported.UseSqlOperatorTables.of(java.lang.Iterable<? extends org.apache.calcite.sql.SqlOperator>)
, which creates an immutable table.This table is designed to be initialized from the fields of a class, and adding operators is not efficientUseSqlValidator.resolveWindow(SqlNode, SqlValidatorScope)
, which does not have the deprecatedpopulateBounds
parameter.UseSqlValidatorUtil.alias(SqlNode)
ifordinal
is negative, orSqlValidatorUtil.alias(SqlNode, int)
ifordinal
is non-negative.Usec.generationStrategy(t, i) == VIRTUAL || c.generationStrategy(t, i) == STORED
UseMatchers.closeTo(double, double)
Now that indicator is deprecated, useRelBuilder.groupKey(Iterable, Iterable)
, which has the same behavior as calling this method withindicator = false
.UseInts.toArray(java.util.Collection)
If a piece of code calls this method, it indicates that the code needs to be cleaned up.UseThrowables.getStackTraceAsString(Throwable)
Throw newAssertionError
Throw newAssertionError
Throw newRuntimeException
if checked; throw raw exception if unchecked orError
Throw newAssertionError
if applicable; orRuntimeException
if e is checked; or raw exception if e is unchecked orError
.UsePreconditions.checkArgument(boolean)
UsePreconditions.checkArgument(boolean)
orObjects.requireNonNull(Object)
UsePreconditions.checkArgument(boolean)
orObjects.requireNonNull(Object)
UseSpaces.padRight(String, int)
UseImmutableList.toImmutableList()
- Override the
-
ConstructorDescriptionorg.apache.calcite.adapter.enumerable.EnumerableCollect
(RelOptCluster, RelTraitSet, RelNode, String) UseCalciteMetaImpl.create(CalciteConnection)
instead.UseRelOptRule.operand(Class, RelOptRuleOperandChildren)
or one of its overloaded methods.UseRelJson.create()
, followed byRelJson.withJsonBuilder(org.apache.calcite.util.JsonBuilder)
ifjsonBuilder
is not null.UseSqlOperatorTables.of(java.lang.Iterable<? extends org.apache.calcite.sql.SqlOperator>)
, which creates an immutable table.UseSqlOperatorTables.of(java.lang.Iterable<? extends org.apache.calcite.sql.SqlOperator>)
, which creates an immutable table.
RexExecutor