[ https://issues.apache.org/jira/browse/IMPALA-6342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17261719#comment-17261719 ]
Tim Armstrong commented on IMPALA-6342: --------------------------------------- This is the error I get. {noformat} ERROR: InternalException: Unable create a hash join with equi-join predicate col1 = col2 because the operands cannot be cast without loss of precision. Operand types: DECIMAL(38,3) = DECIMAL(38,37). {noformat] > Query can incorrectly fail when joining on a decimal column under decimal_v2 > ---------------------------------------------------------------------------- > > Key: IMPALA-6342 > URL: https://issues.apache.org/jira/browse/IMPALA-6342 > Project: IMPALA > Issue Type: Bug > Components: Backend > Reporter: Taras Bobrovytsky > Priority: Major > > The following query returns a warning under decimal_v1. However, it returns > an error when decimal_v2 is enabled. > {code} > with > t1 as (select cast(11.11 as decimal(38,3)) as col1), > t2 as (select cast(1.11 as decimal(38,37)) as col2) > select * from t1 join t2 on (col1 = col2) > {code} > The problem is that the value in col1 can't be scaled up to a scale 37 > without overflowing. This could be bad because the entire query fails under > decimal_v2 if a single such value is encountered. > {noformat -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org For additional commands, e-mail: issues-all-h...@impala.apache.org