hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Hanson (JIRA)" <>
Subject [jira] [Commented] (HIVE-5771) Constant propagation optimizer for Hive
Date Fri, 15 Nov 2013 22:01:23 GMT


Eric Hanson commented on HIVE-5771:

Right now, a query like this:

select ...
from T
where a = 2 * 2;

will not vectorize. This is because the "=(column,scalar)" operator looks in the syntax tree
to find variable expression result or column on the left and a single scalar on the right.
If the constant folder can turn 2 * 2 into the integer literal 4, then the vectorization code
can process the "a = 4" filter.

Being able to fold CAST(constant-expression AS type) will also help, because people use this,
especially for casting a string literal to a timestamp.

> Constant propagation optimizer for Hive
> ---------------------------------------
>                 Key: HIVE-5771
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>          Components: Query Processor
>            Reporter: Ted Xu
>            Assignee: Ted Xu
>         Attachments: HIVE-5771.patch
> Currently there is no constant folding/propagation optimizer, all expressions are evaluated
at runtime. 
> HIVE-2470 did a great job on evaluating constants on UDF initializing phase, however,
it is still a runtime evaluation and it doesn't propagate constants from a subquery to outside.
> It may reduce I/O and accelerate process if we introduce such an optimizer.

This message was sent by Atlassian JIRA

View raw message