Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-71

Provide a way to declare that tables are sorted

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.0-incubating
    • Component/s: None
    • Labels:

      Description

      Provide a way to declare that an external table is sorted. Then the planner will be able to choose algorithms that exploit that.

      We could extend interface Statistic:

      interface Statistic {
        List<List<FieldCollation>> getSortKeys();
      
        class FieldCollation {
          int field;
          Direction direction;
        }
      
        enum Direction {
          ASC,
          DESC
        }
      }
      

      Also provide a way to declare that a CSV file is sorted on particular fields. E.g.

      DEPTNO:int:sort0$ASC,NAME:string
      10,"Sales"
      20,"Marketing"
      30,"Accounts"
      

      ---------------- Imported from GitHub ----------------
      Url: https://github.com/julianhyde/optiq/issues/71
      Created by: julianhyde
      Labels: enhancement,
      Created at: Mon Oct 28 17:54:32 CET 2013
      State: open

        Attachments

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              github-import GitHub Import
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: