hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <>
Subject [jira] [Commented] (HIVE-948) more query plan optimization rules
Date Mon, 18 Feb 2013 19:07:13 GMT


Ashutosh Chauhan commented on HIVE-948:

New file is not in phabricator, so commenting here:
 // updates schema only (this should be the last optimizer modifying operator tree)
+        pSEL.setSchema(cSEL.getSchema());
+      }
* Why  this needs to be last optimizer? Please add more comments for the reason for that.
Even if it is, currently in it is not.
* Also, parent should always have child's schema, isnt it? If so, why you have it in within
if () block.

+      pSEL.getConf().setSelectStar(cSEL.getConf().isSelectStar());
* Shouldn't parent be selectStar either when child is select-star or parent itself is select-star.
e.g, SEL(sel-star)-SEL(no-sel-star). So, this should be pSEL.getConf().setSelectStar(cSEL.getConf().isSelectStar()
|| pSEL.getConf().isSelectStar()); If not, please add comments for it, since it wasn't obvious.

> more query plan optimization rules 
> -----------------------------------
>                 Key: HIVE-948
>                 URL:
>             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,
> 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:

View raw message