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

Test that views with joins work properly

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.8.0
    • None
    • None
    • Reviewed

    Description

      With the testcase

      drop table invites;
      drop table invites2;
      create table invites (foo int, bar string) partitioned by (ds string);
      create table invites2 (foo int, bar string) partitioned by (ds string);
      
      set hive.mapred.mode=strict;
      
      -- test join views: see HIVE-1989
      
      create view v as select invites.bar, invites2.foo, invites2.ds from invites join invites2 on invites.ds=invites2.ds;
      
      explain select * from v where ds='2011-09-01';
      
      drop view v;
      drop table invites;
      drop table invites2;
      

      We should not have the partition pruner complain about invites.ds not having a predicate because the predicate invites2.ds='2011-09-01' will be inferred with the ppd transitivity optimization

      Attachments

        1. HIVE-2426v2.patch
          8 kB
          Charles Chen
        2. HIVE-2426.3.patch
          9 kB
          John Sichi

        Issue Links

          Activity

            People

              ccy Charles Chen
              ccy Charles Chen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: