You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Jinfeng Ni (JIRA)" <ji...@apache.org> on 2013/11/06 03:18:17 UTC

[jira] [Commented] (DRILL-277) Plus operator with float fails

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

Jinfeng Ni commented on DRILL-277:
----------------------------------

The error is caused by the missing of implicit cast.  
The math operator + currently does not support int + float8, only float8 + float 8. 

If we have implicit cast, then int will be promoted to float 8 ( this is called type promotion), and then the current supported float 8 + float 8 operator will make this query work perfectly.

Yash or some other persons are working on the implicit cast. Once the implicit cast is supported, this kind of error will be solved. 


> Plus operator with float fails
> ------------------------------
>
>                 Key: DRILL-277
>                 URL: https://issues.apache.org/jira/browse/DRILL-277
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Mehant Baid
>            Assignee: Mehant Baid
>
> The following query fails
> select cast(_MAP['R_REGIONKEY'] as int) + 1.2 from "/Users/mbaid/incubator-drill/sample-data/region.parquet";
> Error: "Screen received stop request sent. < SchemaChangeException:[ Failure while trying to materialize incoming schema.  Errors:\n \nError in expression at index 1.  Error: Unexpected argument type. Actual type: minor_type: FLOAT8\nmode: REQUIRED\n, Index: 1.  Full expression: null.. ]"



--
This message was sent by Atlassian JIRA
(v6.1#6144)