You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Mihir Kulkarni <mi...@gmail.com> on 2013/06/26 23:16:36 UTC

Does Hive 0.11 have Query Flattening optimizations?

Hello,

Does hive support Query Flattening? For example a query like this:

*SELECT alias.a0, alias.a1*
*FROM*
*            (SELECT COUNT(b) AS a0, c AS a1*
*            FROM test*
*            GROUP BY c) alias*
*WHERE alias.a0 > 2;*
*
*
would be flattened into:

*SELECT COUNT(b), c*
*FROM test*
*GROUP BY c*
*HAVING COUNT(b) > 2;*

Does Hive (0.11) have such kind of optimizations or are they even useful
considering all queries are ultimately converted into MapReduce jobs? At
Informatica Corp we rely on Hive a lot and hence are interested to support
such optimizations.

Thanks in anticipation.

Regards,
*---*
*Mihir Kulkarni
**Software Engineer | Data Engine
Informatica Corporation*