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

Support views with rewriting enabled useful for debugging

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Materialized views
    • None

    Description

      Implement virtual views with rewriting enabled, useful to check whether a certain rewriting will be triggered. These view definitions will be stored in the user session, and they will only be used when simulation mode is enabled and user runs explain cbo / explain cbo extended.

      set hive.simulation.enable=true;
      
      create view mv1_n2 enable rewrite as
      select * from emps_n3 where empid < 150;
      
      explain cbo
      select *
      from (select * from emps_n3 where empid < 120) t
      join depts_n2 using (deptno);
      
      drop view mv1_n2;
      

      Attachments

        1. HIVE-21133.02.patch
          79 kB
          jcamachorodriguez
        2. HIVE-21133.02.patch
          79 kB
          jcamachorodriguez
        3. HIVE-21133.01.patch
          82 kB
          jcamachorodriguez
        4. HIVE-21133.patch
          41 kB
          jcamachorodriguez

        Activity

          People

            jcamacho Jesús Camacho Rodríguez
            jcamacho Jesús Camacho Rodríguez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: