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

Use optimization algorithm to suggest which tiles of a lattice to materialize

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.1-incubating
    • Component/s: None
    • Labels:
      None

      Description

      Use an optimization algorithm to suggest which tiles of a lattice to materialize.

      The standard algorithm is described in Implementing data cubes efficiently; Harinarayan, Rajaraman, Ullman 1996, and pentaho-aggdesigner implements it.

      Add 'algorithm' and 'rowCountEstimate' attributes to the lattice JSON element:

      {
        name: 'star',
        algorithm: true,
        rowCountEstimate: 86000,
        sql: "select 1 from \"foodmart\".\"sales_fact_1997\" as \"s\"\njoin \"foodmart\".\"product\" as \"p\" using (\"product_id\")\njoin \"foodmart\".\"time_by_day\" as \"t\" using (\"time_id\")\njoin \"foodmart\".\"product_class\" as \"pc\" on \"p\".\"product_class_id\" = \"pc\".\"product_class_id\"",
        auto: false,
        defaultMeasures: [ {
            agg: 'sum',
            args: 'unit_sales'
          }, {
            agg: 'sum',
            args: 'store_sales'
          }, {
            agg: 'count'
        } ],
        tiles: [ {
          dimensions: [ 'the_year', ['t', 'quarter'] ],
          measures: [ ]
        } ]
      }
      

      algorithm enables the optimization algorithm.

      rowCountEstimate specifies an estimate of the number of rows in the lattice. If not specified, 1000 is used.

        Activity

        Hide
        julianhyde Julian Hyde added a comment -

        Fixed in http://git-wip-us.apache.org/repos/asf/incubator-optiq/commit/356a6060. (Yes, really. The comment on that commit is wrong.)

        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/incubator-optiq/commit/356a6060 . (Yes, really. The comment on that commit is wrong.)

          People

          • Assignee:
            julianhyde Julian Hyde
            Reporter:
            julianhyde Julian Hyde
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development