jcamachor commented on a change in pull request #2475:
URL: https://github.com/apache/calcite/pull/2475#discussion_r712545032
##########
File path: core/src/main/java/org/apache/calcite/plan/RelOptCluster.java
##########
@@ -146,18 +146,26 @@ public RexBuilder getRexBuilder() {
* @param metadataProvider custom provider
*/
@EnsuresNonNull({"this.metadataProvider", "this.metadataFactory"})
+ @SuppressWarnings("deprecation")
public void setMetadataProvider(
@UnknownInitialization RelOptCluster this,
RelMetadataProvider metadataProvider) {
this.metadataProvider = metadataProvider;
- this.metadataFactory = new MetadataFactoryImpl(metadataProvider);
+ this.metadataFactory =
+ new
org.apache.calcite.rel.metadata.MetadataFactoryImpl(metadataProvider);
Review comment:
This change does not seem necessary? Could we leave it unmodified?
##########
File path: core/src/main/java/org/apache/calcite/prepare/PlannerImpl.java
##########
@@ -362,9 +362,11 @@ private RexBuilder createRexBuilder() {
return requireNonNull(typeFactory, "typeFactory");
}
+ @SuppressWarnings("deprecation")
@Override public RelNode transform(int ruleSetIndex, RelTraitSet
requiredOutputTraits,
RelNode rel) {
ensure(State.STATE_5_CONVERTED);
+ //Remove this when CachingRelMetadataProvider is removed.
Review comment:
Comment can be removed, it will become evident that method below needs
to change if `CachingRelMetadataProvider` is not present.
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1582,7 +1589,7 @@ public String colType(MyRelMetadataQuery
myRelMetadataQuery, RelNode rel, int co
// generates a new call to the provider.
final RelOptPlanner planner = rel.getCluster().getPlanner();
rel.getCluster().setMetadataProvider(
- new CachingRelMetadataProvider(
+ new org.apache.calcite.rel.metadata.CachingRelMetadataProvider(
Review comment:
This change does not seem necessary? Could we leave it unmodified?
##########
File path:
core/src/main/java/org/apache/calcite/rel/metadata/MetadataFactoryImpl.java
##########
@@ -36,7 +36,10 @@
* <p>The cache does not store metadata. It remembers which providers can
* provide which kinds of metadata, for which kinds of relational
* expressions.</p>
+ *
+ * @deprecated Use {@link RelMetadataQuery}.
*/
+@Deprecated
Review comment:
`// to be removed before 2.0` missing
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]