You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Daniel Barclay (Drill) (JIRA)" <ji...@apache.org> on 2015/06/30 02:03:05 UTC

[jira] [Commented] (DRILL-2935) Casting varchar to varbinary fails

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

Daniel Barclay (Drill) commented on DRILL-2935:
-----------------------------------------------

Why did or does this seem to be a bug?

In ISO/IEC 9075-2:2011(E) section 6.13 <cast specification>, syntax rule 6 says that casting from any character string type (CHAR, VARCHAR, or CLOB) to any binary string type (BINARY, VARBINARY, BLOB) is not valid.

The reported behavior seems to be consistent with that.


> Casting varchar to varbinary fails
> ----------------------------------
>
>                 Key: DRILL-2935
>                 URL: https://issues.apache.org/jira/browse/DRILL-2935
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Data Types
>            Reporter: Rahul Challapalli
>            Assignee: Daniel Barclay (Drill)
>             Fix For: 1.2.0
>
>         Attachments: error.log
>
>
> git.commit.id.abbrev=5fbd274
> The below query fails :
> {code}
> select concat(cast(cast('apache ' as varchar(7)) as varbinary(20)), 'drill') from `dummy.json`;
> Query failed: PARSE ERROR: From line 1, column 15 to line 1, column 66: Cast function cannot convert value of type VARCHAR(7) to type VARBINARY(20)
> [4b5916d1-6b96-42a0-9afa-80706f2bd263 on qa-node191.qa.lab:31010]
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> I attached the error log. 



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