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] Created: (HIVE-582) "SELECT count(1) as cnt from src x" not working for column pruning
Date Thu, 25 Jun 2009 09:37:07 GMT
"SELECT count(1) as cnt from src x" not working for column pruning
------------------------------------------------------------------

                 Key: HIVE-582
                 URL: https://issues.apache.org/jira/browse/HIVE-582
             Project: Hadoop Hive
          Issue Type: Bug
            Reporter: Yongqiang He
            Assignee: Yongqiang He


The query "SELECT count(1) as cnt from src x"  has some problems, even though nullgroup*.q
passed in tests. 
Will check and solve it in this jira.
A wrong plan sometimes can be generated due to some unknow factor:
Wrong plan:
{noformat}
STAGE PLANS:
  Stage: Stage-1
    Map Reduce
      Alias -> Map Operator Tree:
        x 
            Select Operator
              Reduce Output Operator
                sort order: 
                tag: -1
      Reduce Operator Tree:
        Group By Operator
          aggregations:
                expr: count(VALUE._col0)
          mode: complete
          Select Operator
            expressions:
                  expr: _col0
                  type: bigint
            File Output Operator
              compressed: false
              GlobalTableId: 0
              table:
                  input format: org.apache.hadoop.mapred.TextInputFormat
                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat

  Stage: Stage-0
    Fetch Operator
      limit: -1
{noformat}

Without unknow factor, correct plan can be generated:
{noformat}
STAGE PLANS:
  Stage: Stage-1
    Map Reduce
      Alias -> Map Operator Tree:
        x 
            Select Operator
              Group By Operator
                aggregations:
                      expr: count(1)
                mode: hash
                Reduce Output Operator
                  sort order: 
                  tag: -1
                  value expressions:
                        expr: _col0
                        type: bigint
      Reduce Operator Tree:
        Group By Operator
          aggregations:
                expr: count(VALUE._col0)
          mode: mergepartial
          Select Operator
            expressions:
                  expr: _col0
                  type: bigint
            File Output Operator
              compressed: false
              GlobalTableId: 0
              table:
                  input format: org.apache.hadoop.mapred.TextInputFormat
                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
{noformat}

-- 
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