drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhishek Girish (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-5595) Casting Floating-point types to Boolean types should be supported
Date Mon, 19 Jun 2017 04:26:00 GMT
Abhishek Girish created DRILL-5595:
--------------------------------------

             Summary: Casting Floating-point types to Boolean types should be supported
                 Key: DRILL-5595
                 URL: https://issues.apache.org/jira/browse/DRILL-5595
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - Data Types, Query Planning & Optimization
    Affects Versions: 1.11.0
            Reporter: Abhishek Girish
            Assignee: Chunhui Shi


Today, only Int and BigInt can be casted to Boolean. Casting Float / Double values to Boolean
fails: 

{code}
select cast(1.0 as boolean) from (values(1));
Error: SYSTEM ERROR: IllegalArgumentException: Invalid value for boolean: 1.0

select cast(t.a as boolean) from (select cast(1.0 as float) as a from (values(1))) t;
Error: SYSTEM ERROR: IllegalArgumentException: Invalid value for boolean: 1.0
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message