[ 
https://issues.apache.org/jira/browse/IMPALA-7027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Meenakshi updated IMPALA-7027:
------------------------------
    Description: 
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

The Query succeeds is we remove the distinct clause or add set 
enable_expr_rewrites=false;

  was:
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 CLAIM_COMMENTS,CAST('' as 
VARCHAR(100))  as CA_USER_ID FROM tablename limit 1

Where as the below query succeeds

Query 2> Success

 SELECT DISTINCT CAST('' as VARCHAR(100)) as CLAIM_COMMENTS,CAST('' as 
VARCHAR(101))  as CA_USER_ID FROM  tablename limit 1

The Query succeeds is we remove the distinct clause or add set 
enable_expr_rewrites=false;


> 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.9.0
>            Reporter: Meenakshi
>            Priority: Critical
>
> 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
> The Query succeeds is we remove the distinct clause or add set 
> enable_expr_rewrites=false;



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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