korlov42 commented on a change in pull request #9276:
URL: https://github.com/apache/ignite/pull/9276#discussion_r680040465



##########
File path: 
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/metadata/IgniteMdSelectivity.java
##########
@@ -109,7 +149,612 @@ public Double getSelectivity(IgniteSortedIndexSpool rel, 
RelMetadataQuery mq, Re
         return mq.getSelectivity(rel.getInput(), rel.condition());
     }
 
-    /** */
+    public Double getSelectivity(RelSubset rel, RelMetadataQuery mq, RexNode 
predicate) {
+        RelNode best = rel.getBest();
+        if (best == null)
+            return super.getSelectivity(rel, mq, predicate);
+
+        return getSelectivity(best, mq, predicate);
+    }
+
+    public Double getSelectivity(IgniteIndexScan rel, RelMetadataQuery mq, 
RexNode predicate) {

Review comment:
       looks like this could be merged with the next method




-- 
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]


Reply via email to