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

Support views with rewriting enabled useful for debugging

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Materialized views
    • Labels:
      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.patch
          41 kB
          Jesus Camacho Rodriguez
        2. HIVE-21133.01.patch
          82 kB
          Jesus Camacho Rodriguez
        3. HIVE-21133.02.patch
          79 kB
          Jesus Camacho Rodriguez
        4. HIVE-21133.02.patch
          79 kB
          Jesus Camacho Rodriguez

          Activity

            People

            • Assignee:
              jcamachorodriguez Jesus Camacho Rodriguez
              Reporter:
              jcamachorodriguez Jesus Camacho Rodriguez
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: