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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.3.0, 1.2.1, 2.0.0
    • Fix Version/s: 1.3.0, 2.0.0
    • Component/s: Tez
    • Labels:
      None
    • Target Version/s:

      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

              • Assignee:
                sershe Sergey Shelukhin
                Reporter:
                gopalv Gopal Vijayaraghavan
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: