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

Use more than one lattice in the same query

    Details

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

      Activity

      Show
      vrajat Rajat Venkatesh added a comment - Opened PR https://github.com/apache/incubator-calcite/pull/95
      Hide
      julianhyde Julian Hyde added a comment -

      As we discussed in the PR, the new test is slow and uses lots of memory. I am looking into it. I will commit when I have a fix.

      Show
      julianhyde Julian Hyde added a comment - As we discussed in the PR, the new test is slow and uses lots of memory. I am looking into it. I will commit when I have a fix.
      Hide
      julianhyde Julian Hyde added a comment -

      I have discovered CALCITE-760. That would seem to explain the problem: your estimate of row count for the inventory_fact_1997 table was 86837, should have been 4070. I fixed the row count and now the test suite completes. Will commit shortly.

      I also changed the planner to disregard tiles (i.e. materialized views that are part of a lattice) when matching materialized views based on tables. Otherwise a huge number of materialized views are added to the search space. Tiles are considered later, using a more efficient algorithm.

      Show
      julianhyde Julian Hyde added a comment - I have discovered CALCITE-760 . That would seem to explain the problem: your estimate of row count for the inventory_fact_1997 table was 86837, should have been 4070. I fixed the row count and now the test suite completes. Will commit shortly. I also changed the planner to disregard tiles (i.e. materialized views that are part of a lattice) when matching materialized views based on tables. Otherwise a huge number of materialized views are added to the search space. Tiles are considered later, using a more efficient algorithm.
      Hide
      vrajat Rajat Venkatesh added a comment -

      Great. This is really useful. I'll pay more attention to the costs while
      setting up lattices. Can I help with respect to disregarding tiles ?

      Show
      vrajat Rajat Venkatesh added a comment - Great. This is really useful. I'll pay more attention to the costs while setting up lattices. Can I help with respect to disregarding tiles ?
      Show
      julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/bc8c4a98 .
      Hide
      jnadeau Jacques Nadeau added a comment -

      Resolved in release 1.4.0-incubating (2015-08-23)

      Show
      jnadeau Jacques Nadeau added a comment - Resolved in release 1.4.0-incubating (2015-08-23)

        People

        • Assignee:
          julianhyde Julian Hyde
          Reporter:
          vrajat Rajat Venkatesh
        • Votes:
          0 Vote for this issue
          Watchers:
          3 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development