hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yongqiang He (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-560) column pruning not working with map joins
Date Thu, 25 Jun 2009 01:25:07 GMT

    [ https://issues.apache.org/jira/browse/HIVE-560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723849#action_12723849
] 

Yongqiang He commented on HIVE-560:
-----------------------------------

{noformat}
      if (conf.getOutputColumnNames().size() < structFields.size()) {
        List<ObjectInspector> structFieldObjectInspectors = new ArrayList<ObjectInspector>();
        for (Byte alias : order) {
          int sz = conf.getExprs().get(alias).size();
          int pos = 0;
          List<Boolean> removed = conf.getRemovedList().get(alias);
          for (int i = 0; i < sz; i++) {
            for (; pos < removed.size(); pos++) {
              if (pos < structFields.size() && !removed.get(pos)) {
                structFieldObjectInspectors.add(structFields.get(pos)
                    .getFieldObjectInspector());
                pos++;
                break;
              }
            }
          }
        }
{noformat}
if (conf.getOutputColumnNames().size() < structFields.size()) can avoid the situations
you mentioned(if all columns are selected).


> column pruning not working with map joins
> -----------------------------------------
>
>                 Key: HIVE-560
>                 URL: https://issues.apache.org/jira/browse/HIVE-560
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.4.0
>            Reporter: Namit Jain
>            Assignee: Yongqiang He
>         Attachments: hive-560-2009-06-19-2.patch, hive-560-2009-06-19-5.patch, hive-560-2009-06-24-mapjoin-before-column-pruning.patch,
hive-560-2009-06-24-normal(mapjoin-after-column-pruning).patch
>
>
> drop table tst1;
> drop table tst2;
> create table tst1(a1 string, a2 string, a3 string, a4 string);
> create table tst2(b1 string, b2 string, b3 string, b4 string);
> explain select /*+ MAPJOIN(a) */ a.a1, a.a2 from tst1 a join tst2 b ON a.a2=b.b2;
> the select is after the join - column pruning is not happening

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message