hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesus Camacho Rodriguez (JIRA)" <>
Subject [jira] [Created] (HIVE-18680) FieldTrimmer missing opportunity with SortLimit operators
Date Sun, 11 Feb 2018 20:04:00 GMT
Jesus Camacho Rodriguez created HIVE-18680:

             Summary: FieldTrimmer missing opportunity with SortLimit operators
                 Key: HIVE-18680
             Project: Hive
          Issue Type: Bug
          Components: CBO
    Affects Versions: 3.0.0
            Reporter: Jesus Camacho Rodriguez
            Assignee: Jesus Camacho Rodriguez

In the following plan, {{_o__col4}} is not needed:

2018-02-11T11:35:14,501 DEBUG [0fda1a20-c7f1-489e-b287-65f35fda9848 main] calcite.sql2rel:
Plan after trimming unused fields
HiveProject(download_volume_bytes=[$0], ri_date=[$1], end_cell_id=[$2], environment=[$3])
  HiveSortLimit(sort0=[$2], dir0=[ASC-nulls-first], fetch=[100])
    HiveProject(download_volume_bytes=[$4], ri_date=[$3], end_cell_id=[$1], environment=[$2],
      HiveAggregate(group=[{0, 1, 2, 3}], agg#0=[sum($4)])
        HiveProject($f0=[$1], $f1=[$2], $f2=[$3], $f3=[$0], $f4=[$4])
          HiveProject(ri_date=[$0], imsi=[$1], end_cell_id=[$2], environment=[$3], s1_u_download_data_volume=[$4])
            HiveTableScan(table=[[default.lsr094]], table:alias=[a])

{{_o__col4}} should be removed by the FieldTrimmer. Otherwise, this may prevent MV rewriting
to be triggered on some queries containing order by/limit clauses.

This message was sent by Atlassian JIRA

View raw message