[
https://issues.apache.org/jira/browse/DRILL-6682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pritesh Maker reassigned DRILL-6682:
------------------------------------
Assignee: Karthikeyan Manivannan (was: Pritesh Maker)
> Cast integer to binary returns incorrect result
> -----------------------------------------------
>
> Key: DRILL-6682
> URL: https://issues.apache.org/jira/browse/DRILL-6682
> Project: Apache Drill
> Issue Type: Bug
> Components: Execution - Relational Operators
> Affects Versions: 1.12.0
> Reporter: Robert Hou
> Assignee: Karthikeyan Manivannan
> Priority: Major
>
> This query returns an empty binary string:
> select cast(123 as binary) from (values(1));
> The same problem occurs for bigint, float and double.
> Casting works if the data type is date, time, timestamp, interval, varchar
> and binary.
> select cast(date '2018-08-10' as binary) from (values(1));
> select length(string_binary(cast(123 as binary))),
> length(string_binary(cast(date '2018-08-10' as binary))) from (values(1));
> +---------+---------+
> | EXPR$0 | EXPR$1 |
> +---------+---------+
> | 0 | 10 |
> +---------+---------+
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)