JoshuaZhuCN opened a new issue, #8078:
URL: https://github.com/apache/hudi/issues/8078
An error occurred when PrestoDB queried a field with TIMESTAMP type in the
MOR table [Snapshot Mode]
```
org.apache.hadoop.io.LongWritable cannot be cast to
org.apache.hadoop.hive.serde2.io.TimestampWritable
```
**To Reproduce**
Steps to reproduce the behavior:
1.
```
drop table if exists `default`.`spark_0_12_1_test2`;
```
2.
```
CREATE TABLE `default`.`spark_0_12_1_test2` (
`id` INT
,`name` string
,`age` INT
,`sync_time` TIMESTAMP
) USING HUDI
TBLPROPERTIES (
`type` = 'mor'
,`primaryKey` = 'id'
,`preCombineField` = 'sync_time'
,`hoodie.bucket.index.hash.field` = 'id'
,`hoodie.index.type` = 'BLOOM'
,`hoodie.datasource.write.hive_style_partitioning` = 'false'
,`hoodie.compaction.payload.class` =
'org.apache.hudi.common.model.OverwriteWithLatestAvroPayload',
`hoodie.datasource.hive_sync.support_timestamp` = 'true'
)
COMMENT 'test_0.12.1';
```
3.
```
INSERT INTO `default`.`spark_0_12_1_test2`(id, name, age, sync_time) SELECT
2 AS id, 'hudi0121' AS name, 22 AS age, NOW() AS sync_time;
update `default`.`spark_0_12_1_test2` set age = 33, sync_time = now() where
id = 2;
```
4. query with prestodb
```
select * from hudi."default".spark_0_12_1_test2;
```
**Environment Description**
* Hudi version : 0.12.1
* Spark version : 3.1.3
* PrestoDB version: 0.279
* Hive version : 3.1.0
* Hadoop version : 3.1.1
* Storage (HDFS/S3/GCS..) : HDFS
* Running on Docker? (yes/no) : no
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]