xndai commented on a change in pull request #1992:
URL: https://github.com/apache/calcite/pull/1992#discussion_r440483287
##########
File path: core/src/test/resources/org/apache/calcite/test/TopDownOptTest.xml
##########
@@ -1080,11 +1080,11 @@ LogicalSort(sort0=[$1], dir0=[ASC])
</Resource>
<Resource name="planAfter">
<![CDATA[
-EnumerableCorrelate(correlation=[$cor0], joinType=[inner],
requiredColumns=[{7}])
- EnumerableSort(sort0=[$1], dir0=[ASC])
+EnumerableSort(sort0=[$1], dir0=[ASC])
+ EnumerableCorrelate(correlation=[$cor0], joinType=[inner],
requiredColumns=[{7}])
Review comment:
Correlate node doesn't implement row count estimate so it always returns
1 as the default implementation, which makes it the best plan with minimal
cost. After this change, since we report stats from RelSet using Join row
count, we are able to get the truly best plan according to current cost model.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]