Paul Rogers created IMPALA-7766:
-----------------------------------

             Summary: Perform constant folding within an expression
                 Key: IMPALA-7766
                 URL: https://issues.apache.org/jira/browse/IMPALA-7766
             Project: IMPALA
          Issue Type: Improvement
          Components: Frontend
    Affects Versions: Impala 3.0
            Reporter: Paul Rogers


Suppose we have the following query:

{code:sql}
SELECT id + 1 + 2, 2 + 3 FROM foo;
{code}

Then, examine the SELECT after rewrites (using the new {{FullRewriteTest}}.) 
We'd expect content folding. However, constant folding only happens if the 
entire expression is constant, it can't handle sub-expressions. Result:

{code:sql}
SELECT id + 1 + 2, 5 FROM foo;
{code}

Constant folding within an expression is tricky, and it is not clear what, if 
any, performance gain would be had. Still, it is worth keeping in mind.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to