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

In strict mode, predicate pushdown does not work on partition columns with statements using left/right join

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.12.0
    • None
    • Query Processor
    • None

    Description

      set hive.mapred.mode=strict;
      drop table mpt3;
      create table mpt3 (s1 string , s2 string) partitioned by (dt string, time string);
      alter table mpt3 add partition (dt='1',time='2');
      drop table mpt4;
      create table mpt4 (s1 string , s2 string) partitioned by (dt string, time string);
      alter table mpt4 add partition (dt='1',time='2');

      Query One: works well
      explain
      select * from mpt3 a join mpt4 b on (a.s1 = b.s1) where a.dt='1' and a.time='2' and b.dt='1';

      Query Two :failed
      hive (default)> explain select a.* from mpt3 a right outer join mpt4 b on (a.s1 = b.s1) where a.dt='1' and a.time='2' and b.dt='1';
      FAILED: SemanticException [Error 10041]: No partition predicate found for Alias "a" Table "mpt3"

      Query Three: failed
      hive (default)> explain select a.* from mpt3 a left outer join mpt4 b on (a.s1 = b.s1) where a.dt='1' and a.time='2' and b.dt='1';
      FAILED: SemanticException [Error 10041]: No partition predicate found for Alias "b" Table "mpt4"

      Attachments

        Activity

          People

            caofangkun caofangkun
            caofangkun caofangkun
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: