You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/11/03 12:23:00 UTC

[jira] [Commented] (IMPALA-10836) Add simplify cast rule

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

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

Commit 217d821e94cc8571c7f21e8a4d55a3d3f900c116 in impala's branch refs/heads/master from skyyws
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=217d821 ]

IMPALA-10836: Add 'SimplifyCastExprRule' rule to rewrite cast expr in some situations

This patch adds a new expr rewrite rule to simplify some cast expr when
cast target data type is the same as inner expr data type. We will
remove unnecessary cast expr if any rules are matched. This kind of
rewrite will improve query performance when casting a non-partition
column, especially when scanning lots of data. Besides, cast expr in
where clause can not pushdown to Kudu server, if we can remove
unnecessary cast expr, Impala will pushdown this predicate to Kudu
server, and this will save lots of time and IO/memmory.

Testing:
- Added unit test cases in `ExprRewriteRulesTest`

Change-Id: Id8fac7100060d4e139a8b24d4795c6f279c55954
Reviewed-on: http://gerrit.cloudera.org:8080/17933
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-by: Zoltan Borok-Nagy <bo...@cloudera.com>


> Add simplify cast rule
> ----------------------
>
>                 Key: IMPALA-10836
>                 URL: https://issues.apache.org/jira/browse/IMPALA-10836
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Frontend
>            Reporter: Xianqing He
>            Assignee: Sheng Wang
>            Priority: Major
>             Fix For: Impala 4.1.0
>
>
> For the function cast we can add the following optimizations:
>  # Removes the inner case conversion expressions that are unnecessary, e.g. cast(cast(col as int) as string) => cast(col as string)
>  # Removes unnecessary cast when the input is already the correct type, e.g. col is bigint, cast(col as bigint) => col



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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