Deprecated API
Contents
-
Deprecated InterfacesInterfaceDescriptionUse
RelFactories.JoinFactoryinstead.As of release 1.19, replaced byCalciteSystemProperty
-
Deprecated ClassesClassDescriptionUse
SetOpNodeAs 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 orRelShuttledirectly. 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.NowPlannerImplimplementsRelOptTable.ViewExpanderdirectly.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.nonEquiConditionsis an empty list.UseRelMetadataQuery.org.apache.calcite.rel.core.RelFactories.TableScanFactoryImplhas calledRelOptTable.toRel(RelOptTable.ToRelContext).UseRelDataTypeField::getIndexUseRelDataTypeField::getNameNow Calcite is Java 8 and higher, we recommend that you implementPredicatedirectly.UseSqlLibraryOperatorTableFactory.getOperatorTable(SqlLibrary...)instead, passingSqlLibrary.ORACLEas argument.
-
Deprecated EnumsEnumDescriptionUse
org.apache.calcite.avatica.SqlState
-
Deprecated Exception Classes
-
Deprecated Fields
-
Deprecated MethodsMethodDescriptionremove 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 aCancelFlagto theContextpassed 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).UseRelMetadataQueryviaRelOptNode.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.DECIMALvalues, you should do two things:- Override the
RelDataTypeSystem.getMaxPrecision(SqlTypeName)method, changing its behavior forDECIMAL; - Make sure that the implementation of your
#getMaxNumericPrecisionmethod 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.DECIMALvalues, you should do two things:- Override the
RelDataTypeSystem.getMaxScale(SqlTypeName)method, changing its behavior forDECIMAL; - Make sure that the implementation of your
#getMaxNumericScalemethod 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 aRexUnknownAsargument, 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).UseSchema.subSchemas()andLookup.get(String)instead.UseSchema.subSchemas()andLookup.getNames(LikePattern)instead.UseSchema.tables()andLookup.get(String)instead.UseSchema.tables()andLookup.getNames(LikePattern)instead.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 bySqlDialectFactoryTo 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.org.apache.calcite.sql.type.SqlTypeUtil.deriveCollectionQueryComponentType(SqlTypeName, RelDataType) UseSqlTypeUtil.integerBound(RelDataType, boolean)withupper = trueUseSqlTypeUtil.integerBound(RelDataType, boolean)withupper = falseUseSqlOperatorTables.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 deprecatedpopulateBoundsparameter.UseSqlValidatorUtil.alias(SqlNode)ifordinalis negative, orSqlValidatorUtil.alias(SqlNode, int)ifordinalis non-negative.Usec.generationStrategy(t, i) == VIRTUAL || c.generationStrategy(t, i) == STOREDUseMatchers.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 newAssertionErrorThrow newAssertionErrorThrow newRuntimeExceptionif checked; throw raw exception if unchecked orErrorThrow newAssertionErrorif applicable; orRuntimeExceptionif 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
-
Deprecated ConstructorsConstructorDescriptionorg.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)ifjsonBuilderis 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.
-
Deprecated Enum Constants
RexExecutor