Hi, I'm inclined to revert https://github.com/apache/calcite/commit/48a20668647b5a5e86073ef0e9ce206669ad6867 Motivation can be found in https://issues.apache.org/jira/browse/CALCITE-1842?focusedCommentId=17004696&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17004696
WDYT? The question there is Sort#computeSelfCost We have (rows, cpu, io) cost fields, however, most of the time we use just **rows** to represent the costing. For instance, EnumerableHashJoin computes the cost and returns (rows, 0, 0). CALCITE-1842 adjusted Sort costing so it moved NLogN to cpu field, and it makes the sorting virtually free because the current Volcano is using rows field only when comparing the costs. Unfortunately, CALCITE-1842 has no tests, so I don't really see what was the problem. Vladimir