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

Hive should support ORC block skipping on nested fields

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.14.0, 1.2.1
    • None
    • ORC

    Description

      Hive supports predicate pushdown (block skipping) for ORC tables only on top-level fields. Hive should also support block skipping on nested fields (within structs).

      Example top-level: the following query selects 0 rows, using a predicate on top-level column foo. We also see 0 INPUT_RECORDS in the summary:

      SET hive.tez.exec.print.summary=true;
      CREATE TABLE t_toplevel STORED AS ORC AS SELECT 23 AS foo;
      SELECT * FROM t_toplevel WHERE foo=42 ORDER BY foo;
      
      [...]
      VERTICES         TOTAL_TASKS  FAILED_ATTEMPTS KILLED_TASKS DURATION_SECONDS    CPU_TIME_MILLIS     GC_TIME_MILLIS  INPUT_RECORDS   OUTPUT_RECORDS
      Map 1                      1                0            0             1.22              2,640                102              0                0
      

      Example nested: the following query also selects 0 rows, but using a predicate on nested column foo.bar. Unfortunately we see 1 INPUT_RECORDS in the summary:

      SET hive.tez.exec.print.summary=true;
      CREATE TABLE t_nested STORED AS ORC AS SELECT NAMED_STRUCT('bar', 23) AS foo;
      SELECT * FROM t_nested WHERE foo.bar=42 ORDER BY foo;
      
      [...]
      VERTICES         TOTAL_TASKS  FAILED_ATTEMPTS KILLED_TASKS DURATION_SECONDS    CPU_TIME_MILLIS     GC_TIME_MILLIS  INPUT_RECORDS   OUTPUT_RECORDS
      Map 1                      1                0            0             3.66              5,210                 68              1                0
      

      Attachments

        Issue Links

          Activity

            People

              ashish-kumar-sharma Ashish Sharma
              akatose Michael Haeusler
              Votes:
              3 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m