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

DPP: UDFs on the partition column side does not evaluate correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.2.1, 1.3.0, 2.0.0
    • 1.3.0, 2.0.0
    • Tez
    • None

    Description

      Related to HIVE-12462

      select count(1) from accounts a, transactions t where year(a.dt) = year(t.dt) and account_id = 22;
      
      $hdt$_0:$hdt$_1:a
        TableScan (TS_2)
          alias: a
          filterExpr: (((account_id = 22) and year(dt) is not null) and (year(dt)) IN (RS[6])) (type: boolean)
      

      Ends up being evaluated as year(cast(dt as int)) because the pruner only checks for final type, not the column type.

          ObjectInspector oi =
              PrimitiveObjectInspectorFactory.getPrimitiveWritableObjectInspector(TypeInfoFactory
                  .getPrimitiveTypeInfo(si.fieldInspector.getTypeName()));
      
          Converter converter =
              ObjectInspectorConverters.getConverter(
                  PrimitiveObjectInspectorFactory.javaStringObjectInspector, oi);
      

      Attachments

        1. HIVE-12473.patch
          3 kB
          Sergey Shelukhin

        Issue Links

          Activity

            People

              sershe Sergey Shelukhin
              gopalv Gopal Vijayaraghavan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: