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

Apply ColumnPrunning for noop PTFs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 1.1.0
    • PTF-Windowing
    • None

    Description

      Currently, PTF disables CP optimization, which can make a huge burden. For example,

      select p_mfgr, p_name, p_size,
      rank() over (partition by p_mfgr order by p_name) as r,
      dense_rank() over (partition by p_mfgr order by p_name) as dr,
      sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1
      from noop(on part 
        partition by p_mfgr
        order by p_name
        );
      
      STAGE PLANS:
        Stage: Stage-1
          Map Reduce
            Map Operator Tree:
                TableScan
                  alias: part
                  Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
                  Reduce Output Operator
                    key expressions: p_mfgr (type: string), p_name (type: string)
                    sort order: ++
                    Map-reduce partition columns: p_mfgr (type: string)
                    Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
                    value expressions: p_partkey (type: int), p_name (type: string), p_mfgr (type: string), p_brand (type: string), p_type (type: string), p_size (type: int), p_container (type: string), p_retailprice (type: double), p_comment (type: string), BLOCK__OFFSET__INSIDE__FILE (type: bigint), INPUT__FILE__NAME (type: string), ROW__ID (type: struct<transactionid:bigint,bucketid:int,rowid:bigint>)
      ...
      

      There should be a generic way to discern referenced columns but before that, we know CP can be safely applied to noop functions.

      Attachments

        1. HIVE-9341.4.patch.txt
          944 kB
          Navis Ryu
        2. HIVE-9341.3.patch.txt
          944 kB
          Navis Ryu
        3. HIVE-9341.2.patch.txt
          928 kB
          Navis Ryu
        4. HIVE-9341.1.patch.txt
          459 kB
          Navis Ryu

        Issue Links

          Activity

            People

              navis Navis Ryu
              navis Navis Ryu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: