drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victoria Markman (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-2244) Implicit cast between decimal data types is not implemented
Date Fri, 13 Feb 2015 21:29:12 GMT
Victoria Markman created DRILL-2244:
---------------------------------------

             Summary: Implicit cast between decimal data types is not implemented
                 Key: DRILL-2244
                 URL: https://issues.apache.org/jira/browse/DRILL-2244
             Project: Apache Drill
          Issue Type: Improvement
          Components: Execution - Codegen
    Affects Versions: 0.8.0
            Reporter: Victoria Markman
            Assignee: Mehant Baid


I created two tables in drill with the following schema:
t1.c1 - decimal(8,2)
t2.c1 - decimal(18,4)

Attempt to join on these columns produces run time error on not implemented compare function.
Since we do support cast from INT to BIGINT, this behavior is inconsistent.

{code}
0: jdbc:drill:schema=dfs> select * from x1, x2 where x1.c1 = x2.c1;
Query failed: RemoteRpcException: Failure while running fragment., Failure finding function
that runtime code generation expected.  Signature: compare_to( DECIMAL9:OPTIONALDECIMAL18:OPTIONAL,
 ) returns INT:REQUIRED [ 53049aa6-7165-4e5a-9dc5-9efa832b4e49 on atsqa4-134.qa.lab:31010
]
[ 53049aa6-7165-4e5a-9dc5-9efa832b4e49 on atsqa4-134.qa.lab:31010 ]
Error: exception while executing query: Failure while executing query. (state=,code=0)
{code}

Explicit cast works:
{code}
0: jdbc:drill:schema=dfs> select * from x1  left outer join x2 on cast(x1.c1 as decimal(18,2))
= x2.c1;
+------------+------------+
|     c1     |    c10     |
+------------+------------+
| 1032.65    | null       |
+------------+------------+
1 row selected (0.137 seconds)
{code}



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

Mime
View raw message