[
https://issues.apache.org/jira/browse/IMPALA-5929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16729840#comment-16729840
]
Dinesh Garg commented on IMPALA-5929:
-------------------------------------
Reopened since the fix introduced a bug as explained inĀ IMPALA-7960.
> Remove useless explicit casts to string
> ---------------------------------------
>
> Key: IMPALA-5929
> URL: https://issues.apache.org/jira/browse/IMPALA-5929
> Project: IMPALA
> Issue Type: Bug
> Components: Frontend
> Affects Versions: Impala 2.5.0, Impala 2.6.0, Impala 2.7.0, Impala 2.8.0,
> Impala 2.9.0, Impala 2.10.0
> Reporter: Alexander Behm
> Assignee: Bikramjeet Vig
> Priority: Critical
> Labels: newbie
> Fix For: Impala 2.12.0
>
>
> Some BI tools like to generate expressions that look like this:
> {code}
> cast(numeric_col as string) = '123456'
> {code}
> Casting and comparing as string is expensive and we should convert such
> expressions to:
> {code}
> numeric_col = 123456
> {code}
> Such transformations may be applicable in other situations as well. We should
> be careful about transforming inequality predicates because the string and
> numeric comparison might not always be equivalent. For example, the following
> transformation would be wrong:
> {code}
> cast(numeric_col as string) = '0123456'
> {code}
> is *not* equivalent to
> {code}
> numeric_col = 123456
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]