>And how does calcite > compare the costs of different nodes in different convention?
Lekshmi, please check RelOptCost interface. https://github.com/apache/calcite/blob/9721283bd0ce46a337f51a3691585cca8003e399/core/src/main/java/org/apache/calcite/plan/RelOptCost.java#L68-L91 Adaptor implementation must implement cost comparison methods as well (isLe, isLt, etc) Vladimir