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

Jacques Nadeau commented on DRILL-4475:
---------------------------------------

This isn't a bug. SQL doesn't allow implicit casting between varbinary and 
varchar. 

There is a bug in drill where it will sometimes let the user do this cast if 
Drill doesn't detect the type until late in execution.

> Joins containing join key between varbinary and non-varbinary fails
> -------------------------------------------------------------------
>
>                 Key: DRILL-4475
>                 URL: https://issues.apache.org/jira/browse/DRILL-4475
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 1.5.0
>            Reporter: Krystal
>            Assignee: Sean Hsuan-Yi Chu
>
> Join queries that contain one join key as varbinary and the other join key as 
> a non-varbinary such as varchar fails.  For example:
> select s.name, s.age, s.gpa, v.registration from student_csv_v s inner join 
> voter_csv_v v on (s.name = v.name);
> Error: VALIDATION ERROR: From line 1, column 95 to line 1, column 109: Cannot 
> apply '=' to arguments of type '<VARBINARY(1)> = <CHAR(30)>'. Supported 
> form(s): '<COMPARABLE_TYPE> = <COMPARABLE_TYPE>'
> s.name is a varbinary and v.name is char(30).  Drill should implicitly cast 
> the join keys to varchar at planning time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to