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.getMaxPrecision(org.apache.calcite.sql.type.SqlTypeName)(DECIMAL).Instead of calling this method, you should call
getMaxPrecision(DECIMAL).If you wish to change the maximum precision of
SqlTypeName.DECIMALvalues, override theRelDataTypeSystem.getMaxPrecision(SqlTypeName)method, changing its behavior forDECIMAL.Replaced byRelDataTypeSystem.getMaxScale(org.apache.calcite.sql.type.SqlTypeName)(DECIMAL).Instead of calling this method, you should call
getMaxScale(DECIMAL).If you wish to change the maximum scale of
SqlTypeName.DECIMALvalues, override theRelDataTypeSystem.getMaxScale(SqlTypeName)method, changing its behavior forDECIMAL.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()
-
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 ConstantsEnum ConstantDescription
NullPolicy.SEMI_STRICThas identical semantics so use this instead.UseSqlKind.GROUPING.
RexExecutor