impala-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Tauber-Marshall (JIRA)" <>
Subject [jira] [Resolved] (IMPALA-1861) Conditional functions with constant arguments should be simplified during analysis
Date Mon, 17 Apr 2017 15:31:41 GMT


Thomas Tauber-Marshall resolved IMPALA-1861.
       Resolution: Fixed
    Fix Version/s: Impala 2.9.0

See also: IMPALA-5211

commit 4b486b0f90936ab5bc32daf0859bc74b340dd179
Author: Thomas Tauber-Marshall <>
Date:   Wed Dec 28 15:15:10 2016 -0800

    IMPALA-1861: Simplify conditionals with constant conditions
    When there are conditionals with constant values of TRUE or
    FALSE we can simplify them during analysis using the ExprRewriter.
    This patch introduces the SimplifyConditionalsRule with covers IF,
    OR, AND, CASE, and DECODE.
    It also introduces NormalizeExprsRule which normalizes AND and OR
    such that if either child is a BoolLiteral, then the left child is a
    - Added unit tests to ExprRewriteRulesTest.
    - Added functional tests to expr.test
    - Ran FE planner tests and BE expr-test.
    Change-Id: Id70aaf9fd99f64bd98175b7e2dbba28f350e7d3b
    Reviewed-by: Jim Apple <>
    Tested-by: Impala Public Jenkins

> Conditional functions with constant arguments should be simplified during analysis
> ----------------------------------------------------------------------------------
>                 Key: IMPALA-1861
>                 URL:
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Frontend
>    Affects Versions: Impala 2.2
>            Reporter: Dimitris Tsirogiannis
>            Assignee: Thomas Tauber-Marshall
>            Priority: Minor
>              Labels: impala, performance
>             Fix For: Impala 2.9.0
> The frontend should be able to detect conditional functions with constant predicates
(e.g. IF(true, expr1, expr2)) and automatically replace them with the correct result during
the analysis.

This message was sent by Atlassian JIRA

View raw message