You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/10/30 08:28:48 UTC
[GitHub] [iceberg] qphien edited a comment on pull request #1612: Hive: Using Hive schema to create tables and partition specification
qphien edited a comment on pull request #1612:
URL: https://github.com/apache/iceberg/pull/1612#issuecomment-719405800
```
hive (iceberg)> desc decimal_table;
OK
col_name data_type comment
val decimal(7,2) from deserializer
hive (iceberg)> select * from decimal_table where val > 100.1;
OK
decimal_table.val
Failed with exception java.io.IOException:org.apache.iceberg.exceptions.ValidationException: Invalid value for conversion to type decimal(7, 2): 100.1 (java.math.BigDecimal)
```
This PR throws exception when scale specified in filter is different with iceberg.
```
hive (iceberg)> select * from decimal_table where val > cast(100.1 as decimal(7,2));
OK
decimal_table.val
Failed with exception java.io.IOException:org.apache.iceberg.exceptions.ValidationException: Invalid value for conversion to type decimal(7, 2): 100.1 (java.math.BigDecimal)
```
Even if 100.1 is cast as decimal(7, 2), hive still throws the same exception.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org