You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Mehant Baid (JIRA)" <ji...@apache.org> on 2015/04/02 20:32:53 UTC
[jira] [Updated] (DRILL-2244) Implicit cast between numeric data
type in joins
[ https://issues.apache.org/jira/browse/DRILL-2244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mehant Baid updated DRILL-2244:
-------------------------------
Summary: Implicit cast between numeric data type in joins (was: Implicit cast between decimal data types is not implemented)
> Implicit cast between numeric data type in joins
> ------------------------------------------------
>
> 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
> Fix For: 0.9.0
>
> Attachments: DRILL-2244.patch
>
>
> 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)