[ https://issues.apache.org/jira/browse/DRILL-2244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14326111#comment-14326111 ]
Aman Sinha commented on DRILL-2244: ----------------------------------- Couple of quick comments, but would prefer if you could create a review board for it since some code has been refactored. - the error message: "Join conditions cannot be compared failing build expression:" + " %s failing probe expression: %s" indicates this only applies to HashJoin but this implicit cast method is used for MergeJoin as well, so we should change this. - the change to move the creation of the hash table value vectors after the call to add casts looks reasonable..I am just wondering why it was working for int-bigint and other types and not for decimal. > 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 > 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)