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

Navis commented on HIVE-948:
----------------------------

Ah, sorry. I'l update that.

bq. Why this needs to be last optimizer?
It's not updating infos for the SEL including colExprMap, etc. Following 
optimizers like GlobalLimitOptimizer or SimpleFetchOptimizer does not  modify 
operator tree. (Possibly update infos, but I was even thinking of removing all 
of them as a CleanupProcessor, making the plan file smaller)

bq. Also, parent should always have child's schema, isnt it?
I thought SEL(no-compute) does not have schema because it just inherits that of 
parent. I'll check it again.

bq. Shouldn't parent be selectStar either when child is select-star or parent 
itself is select-star.
I've escaped those situations before applying it like this (in the missing 
file), cause I'm not sure of it.
{code}
if (pSEL.getConf().isSelStarNoCompute()) {
  // SEL(no-compute)-SEL. never seen this condition, and removing parent is not 
safe in current graph walker
  return null;
}
{code}
                
> more query plan optimization rules 
> -----------------------------------
>
>                 Key: HIVE-948
>                 URL: https://issues.apache.org/jira/browse/HIVE-948
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Ning Zhang
>            Assignee: Navis
>         Attachments: HIVE-948.D8463.1.patch, HIVE-948.D8463.2.patch, 
> HIVE-948.D8463.3.patch, HIVE-948.D8463.3.patch
>
>
> Many query plans are not optimal in that they contain redundant operators. 
> Some examples are unnecessary select operators (select followed by select, 
> select output being the same as input etc.). Even though these operators are 
> not very expensive, they could account for around 10% of CPU time in some 
> simple queries. It seems they are low-hanging fruits that we should pick 
> first. 
> BTW, it seems these optimization rules should be added at the last stage of 
> the physical optimization phase since some redundant operators are added to 
> facilitate physical plan generation. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to