Open allendang001 opened 3 years ago
Can you please provide the steps to reproduce, i.e. what commands should one execute in hive and in Trino to reproduce the problem?
Can you please provide the steps to reproduce, i.e. what commands should one execute in hive and in Trino to reproduce the problem?
hive statement:
CREATE EXTERNAL TABLE `test_partition`(
`name` string,
`salary` int)
PARTITIONED BY (
`age` int)
ROW FORMAT SERDE
'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
'file://tmp/test'
TBLPROPERTIES (
'transient_lastDdlTime'='1608723685587');
insert into test_partition values('test',400,200);
trino statement:
select * from test_partition where age = 200;
exception : Table 'aa.test_partition' was dropped by another transaction
trino statement:
select * from test_partition where age = 200;
no exception
@allendang001 for completeness, which hive version are you using?
don't you need some SET
statement in hive to enable dynamic partition insert?
@allendang001 for completeness, which hive version are you using? don't you need some
SET
statement in hive to enable dynamic partition insert?
hive version : 2.3.5 hive.exec.dynamic.partition = true
The problem is that we use presto to analyze a hive table whose partition key type is integer, with 'hive.metastore.thrift.assume-canonical-partition-keys' default false. Presto reported that the partitions did not exist, but in fact, we can use the "show partitions" statement to view the partition.After change this parameter to true, the data of this partition can be queried normally.