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

        Activity

        Hide
        github-import GitHub Import added a comment -

        [Date: Mon Oct 28 18:43:30 CET 2013, Author: julianhyde]

        Note to self: create "enum Direction" by moving enum RelFieldCollation.Direction and renaming its fields Ascending to ASC etc.

        Show
        github-import GitHub Import added a comment - [Date: Mon Oct 28 18:43:30 CET 2013, Author: julianhyde ] Note to self: create "enum Direction" by moving enum RelFieldCollation.Direction and renaming its fields Ascending to ASC etc.
        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/2709896e .
        Hide
        julianhyde Julian Hyde added a comment -

        Closing now that 1.1.0-incubating has been released.

        Show
        julianhyde Julian Hyde added a comment - Closing now that 1.1.0-incubating has been released.

          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:

              Development