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

PartitionPruner doesn't handle top level constant expression correctly

    XMLWordPrintableJSON

Details

    Description

      You hit this error indirectly, because how we handle invalid constant comparisons. Consider:

      create table x(key int, value string) partitioned by (dt int, ts string);
      
      -- both these queries hit this issue
      select * from x where key = 'abc';
      select * from x where dt = 'abc';
      
      -- the issue is the comparison get converted to the constant false
      -- and the PartitionPruner doesn't handle top level constant exprs corrcetly
      

      Thanks to hsubramaniyan for uncovering this as part of adding tests for HIVE-5376

      Attachments

        1. HIVE-6934.92.patch
          21 kB
          Hari Sankar Sivarama Subramaniyan
        2. HIVE-6934.91.patch
          20 kB
          Hari Sankar Sivarama Subramaniyan
        3. HIVE-6934.9.patch
          20 kB
          Hari Sankar Sivarama Subramaniyan
        4. HIVE-6934.8.patch
          17 kB
          Hari Sankar Sivarama Subramaniyan
        5. HIVE-6934.7.patch
          4 kB
          Hari Sankar Sivarama Subramaniyan
        6. HIVE-6934.6.patch
          5 kB
          Hari Sankar Sivarama Subramaniyan
        7. HIVE-6934.5.patch
          4 kB
          Hari Sankar Sivarama Subramaniyan
        8. HIVE-6934.4.patch
          5 kB
          Hari Sankar Sivarama Subramaniyan

        Issue Links

          Activity

            People

              hsubramaniyan Hari Sankar Sivarama Subramaniyan
              rhbutani Harish Butani
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: