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 2022/02/16 17:19: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=17493365#comment-17493365 ] 

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

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

IMPALA-11049: Added expr analyzed check in 'SimplifyCastExprRule.java'

We added a new expr rewrite rule 'SimplifyCastExprRule.java' in
IMPALA-10836. If expr is not analyzed, this rewrite rule would throw
an 'AnalysisException', this is due to 'orderByElements_' not been
analyzed. We try to substitute order by elements when creating
'SortInfo', but caused some other problems. So we only add expr
analyzed check in this rule to solve this problem. When adding other
expr rewrite rules in the future, we should also add this check.

Testing:
- Added test cases in 'explain-level3.test'

Change-Id: I2780e04a6d5a32e224cd0470cf6f166a832363ec
Reviewed-on: http://gerrit.cloudera.org:8080/18099
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@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.20.1#820001)

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