Open wgzhao opened 3 years ago
Did you reduce decimal scale of your column?
What happens is that Presto reads Parquet file which has decimal data with larger scale, but table/partition schema contains column with smaller scale. In that case decimal data would have to be scaled down and trailing digits would be lost. Presto currently doesn't support rounding in such case.
However, if you increased scale of column that should not happen.
I create the above table using stored as parquet
instead of stored as orc
.
when I change the column's precision. presto and hive both query old pricison. 0.003
missing .
like the following :
hive query
hive> select * from test_part_tbl;
+-------------------+----------------------+------------------------+
| test_part_tbl.id | test_part_tbl.asset | test_part_tbl.logdate |
+-------------------+----------------------+------------------------+
| 1 | 10.220 | 20200910 |
| 1 | 10.230 | 20200911 |
| 1 | 10.230 | 20200911 |
+-------------------+----------------------+------------------------+
presto query
presto> select * from hive.default.test_part_tbl;
id | asset | logdate
----+--------+----------
1 | 10.230 | 20200911
1 | 10.220 | 20200910
1 | 10.230 | 20200911
(3 rows)
cc @findepi
I would like to take this up, if no one is working on it.
Is this PR merged ?
I have an external hive partitioned table, when I change the table's structure (mostly modify column precision), presto query will trigger the following errors:
The above error can be repeated by doing the following instructions:
test_part_tbl
via prestotest_part_tbl
via hiveIf I drop partition
20200911
and add it again , query will result all data.I use Hortonworks HDP
3.1.4.0-315
version