Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-16013

Calcite engine. Introduce sort-with-limit physical relational operator

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.14
    • None

    Description

      Currently, sort and limit are different physical relational operators, but in some cases, sort combined with a limit can be more effective. For example ORDER BY x LIMIT 1 requires to store only one row and can be processed with O(rowsCount) operations. In general. ORDER BY x LIMIT m requires O(min(rowsCount, m)) memory and have O(rowsCount * ln(min(rowsCount, m))) complexity.
      Since Limit node can't be moved below the Exchange node, ORDER BY x LIMIT m clause should produce two nodes: Limit node, with single distribution, and SortWithLimit node, which can be moved below the Exchange node and can reduce network traffic.

      Attachments

        Issue Links

          Activity

            People

              vladsz83 Vladimir Steshin
              alex_pl Aleksey Plekhanov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 7h 50m
                  7h 50m