[ 
https://issues.apache.org/jira/browse/IMPALA-6590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17765801#comment-17765801
 ] 

ASF subversion and git services commented on IMPALA-6590:
---------------------------------------------------------

Commit 130a55e5269ea023b43ef2c0b495989cb0759800 in impala's branch 
refs/heads/branch-4.3.0 from Abhishek Rawat
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=130a55e52 ]

IMPALA-11284: Do non-optional rewrites for || and Between predicate

IMPALA-6590 disabled expression rewrites for ValuesStmt. However,
CompoundVerticalBarExpr (||) cannot be executed directly without
rewrite. This is because it could either be an OR operation with boolean
arguments or CONCAT function call with string arguments.

Backend cannot evaluate a BetweenPredicate and relies on rewriting
BetweenPredicate into a conjunctive or disjunctive CompoundPredicate.

This patch enables non-optional expression rewrites for ValuesStmt with
CompoundVerticalBarExpr or BetweenPredicate.

Testing:
- Extended ExprRewriterTest and Planner test to have values clause
  with || and Between predicate

Change-Id: I99b8b33bf6468d12b9e26f0a6e744feb7072619c
Reviewed-on: http://gerrit.cloudera.org:8080/18581
Reviewed-by: Michael Smith <michael.sm...@cloudera.com>
Reviewed-by: Daniel Becker <daniel.bec...@cloudera.com>
Tested-by: Riza Suminto <riza.sumi...@cloudera.com>


> Disable expr rewrites and codegen for VALUES() statements
> ---------------------------------------------------------
>
>                 Key: IMPALA-6590
>                 URL: https://issues.apache.org/jira/browse/IMPALA-6590
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 2.8.0, Impala 2.9.0, Impala 2.10.0, Impala 2.11.0
>            Reporter: Alexander Behm
>            Assignee: Wenzhe Zhou
>            Priority: Major
>              Labels: perf, planner, ramp-up, regression
>             Fix For: Impala 4.1.0
>
>
> The analysis of statements with big VALUES clauses like INSERT INTO <tbl> 
> VALUES is slow due to expression rewrites like constant folding. The 
> performance of such statements has regressed since the introduction of expr 
> rewrites and constant folding in IMPALA-1788.
> We should skip expr rewrites for VALUES altogether since it mostly provides 
> no benefit but can have a large overhead due to evaluation of expressions in 
> the backend (constant folding). These expressions are ultimately evaluated 
> and materialized in the backend anyway, so there's no point in folding them 
> during analysis.
> Similarly, there is no point in doing codegen for these exprs in the backend 
> union node.
> *Workaround*
> {code}
> SET ENABLE_EXPR_REWRITES=FALSE;
> SET DISABLE_CODEGEN=TRUE;
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
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