Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-18394

Materialized view: "Create Materialized View" should default to rewritable ones

    XMLWordPrintableJSON

Details

    Description

      This is a usability ticket, since it is possible to end up creating materialized views and realize that they need an additional flag to be picked up by the optimizer to do rewrites to.

      create materialized view ca as select * from customer, customer_address where c_current_addr_sk = ca_address_sk;
      set hive.materializedview.rewriting=true;
      select count(1) from customer, customer_address where c_current_addr_sk = ca_address_sk; -- does not use materialized view
      

      Needs another step

      alter materialized view ca enable rewrite;
      

      And then, it kicks in

      select count(1) from customer, customer_address where c_current_addr_sk = ca_address_sk;
      OK
      12000000
      Time taken: 0.494 seconds, Fetched: 1 row(s)
      

      Attachments

        1. HIVE-18394.patch
          114 kB
          jcamachorodriguez
        2. HIVE-18394.01.patch
          124 kB
          jcamachorodriguez
        3. HIVE-18394.02.patch
          129 kB
          jcamachorodriguez
        4. HIVE-18394.03.patch
          156 kB
          jcamachorodriguez

        Activity

          People

            jcamacho Jesús Camacho Rodríguez
            gopalv Gopal Vijayaraghavan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: