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 2019/08/22 06:03:00 UTC

[jira] [Commented] (IMPALA-7027) Multiple Cast to Varchar with different limit fails with "AnalysisException: null CAUSED BY: IllegalArgumentException: "

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

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

Commit a85b18503f430acbf7f0bd285b67c3eecc7ac377 in impala's branch refs/heads/master from Yongzhi Chen
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=a85b185 ]

IMPALA-7027: fix StringLiteral.localEquals()

String literals with the same value but different types
are not interchangeable. localEquals() should check
the type, similar to a cast expression.

Testing:
- Added String literals tests.
- Passed exhaustive tests.

Change-Id: I6a9dff514c2c4cc422343d1dfbd881917acca138
Reviewed-on: http://gerrit.cloudera.org:8080/14096
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Multiple Cast to Varchar with different limit fails with "AnalysisException: null CAUSED BY: IllegalArgumentException: "
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IMPALA-7027
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7027
>             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, Impala 3.0, Impala 2.12.0
>            Reporter: Meenakshi
>            Assignee: Yongzhi Chen
>            Priority: Major
>              Labels: planner, regression
>
> If we have multiple cast of '' to varchar statements in a impala query which has a distinct like below, the query breaks for scenario when the cast to varchar limit in the SQL is lower than the previous cast.
>  
> Query 1> Fails with " AnalysisException: null CAUSED BY: IllegalArgumentException: targetType=VARCHAR(100) type=VARCHAR(101)"
> SELECT DISTINCT CAST('' as VARCHAR(101)) as CL_COMMENTS,CAST('' as VARCHAR(100))  as CL_USER_ID FROM tablename limit 1
> Where as the below query succeeds
> Query 2> Success
>  SELECT DISTINCT CAST('' as VARCHAR(100)) as CL_COMMENTS,CAST('' as VARCHAR(101))  as CL_USER_ID FROM  tablename limit 1
> *Workaround*
> SET ENABLE_EXPR_REWRITES=false;



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

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