Class SortRemoveRuleTest


  • public final class SortRemoveRuleTest
    extends java.lang.Object
    Tests the application of the SortRemoveRule.
    • Constructor Detail

      • SortRemoveRuleTest

        public SortRemoveRuleTest()
    • Method Detail

      • transform

        private org.apache.calcite.rel.RelNode transform​(java.lang.String sql,
                                                         org.apache.calcite.tools.RuleSet prepareRules)
                                                  throws java.lang.Exception
        The default schema that is used in these tests provides tables sorted on the primary key. Due to this scan operators always come with a RelCollation trait.
        Throws:
        java.lang.Exception
      • removeSortOverEnumerableCorrelate

        public void removeSortOverEnumerableCorrelate()
                                               throws java.lang.Exception
        Test case for [CALCITE-2554] Enrich enumerable join operators with order preserving information.

        Since join inputs are sorted, and this join preserves the order of the left input, there shouldn't be any sort operator above the join.

        Until CALCITE-2018 is fixed we can add back EnumerableRules.ENUMERABLE_SORT_RULE

        Throws:
        java.lang.Exception
      • toString

        private java.lang.String toString​(org.apache.calcite.rel.RelNode rel)