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

full table scan in WHERE clause OR condition

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3.2
    • None
    • HiveServer2, hpl/sql
    • hive server2; hive version is 2.3.2; 

    • Incompatible change, Reviewed
    • Patch

    Description

      In strict mode, I query my hql on a partitioned table:

      select * from tbl where date = '2018-08-08' or age > 18

      The table tbl is partitioned, and its partition key is date, age is just a attribute column.

      This hql in strict mode can be executed, when the condition is "date = '2018-08-08' " this query scans one partition only but when the condition is "age > 18" ,the query will scan the full table.

      It seems that in strict mode,Hive checks the condition of table partition but ignores the logic of where clause?

      Any help is useful!

      Thanks!

      Attachments

        Activity

          People

            Unassigned Unassigned
            lsy3993 lishiyang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 168h
                168h
                Remaining:
                Remaining Estimate - 168h
                168h
                Logged:
                Time Spent - Not Specified
                Not Specified