Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][HIVE-CONNECT] - Failed to Execute Simple CATS Operation in Trino Due to Hive executeUpdateStatisticsOperations Issue #22020

Closed
Shkin1 opened this issue May 18, 2024 · 1 comment

Comments

@Shkin1
Copy link

Shkin1 commented May 18, 2024

Description:
When attempting to execute a simple cats operation in Trino, it appears to be unsupported, potentially due to issues with updating Hive metadata operations.

sql case:

create table test.tmp_cats_issue_demo1 as 
select current_date as dt    --failed

-------------------------------------
create table test.tmp_cats_issue_demo2 as 
select '2024-00-01' as dt   -- success

Version:
trino: 389
hive: 2.3.9

stack:
io.trino.spi.TrinoException: All operations other than the following update operations were completed: replace table parameters test.tmp_cats_issue_demo2
at io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore$Committer.executeUpdateStatisticsOperations(SemiTransactionalHiveMetastore.java:2212)
at io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore.commitShared(SemiTransactionalHiveMetastore.java:1524)
at io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore.commit(SemiTransactionalHiveMetastore.java:1255)
at io.trino.plugin.hive.HiveMetadata.commit(HiveMetadata.java:3413)
at io.trino.plugin.hive.HiveTransactionManager.lambda$commit$0(HiveTransactionManager.java:59)
at java.base/java.util.Optional.ifPresent(Optional.java:183)
at io.trino.plugin.hive.HiveTransactionManager.commit(HiveTransactionManager.java:57)
at io.trino.plugin.hive.HiveConnector.commit(HiveConnector.java:207)
at io.trino.metadata.CatalogTransaction.commit(CatalogTransaction.java:78)
at io.trino.metadata.CatalogMetadata.commit(CatalogMetadata.java:130)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
at io.airlift.concurrent.BoundedExecutor.drainQueue(BoundedExecutor.java:80)
at io.trino.$gen.Trino_393bd96____20240130_102949_2.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Suppressed: io.trino.spi.TrinoException: xxxxx
at io.trino.plugin.hive.metastore.thrift.ThriftHiveMetastore.setTableColumnStatistics(ThriftHiveMetastore.java:537)
at io.trino.plugin.hive.metastore.thrift.ThriftHiveMetastore.updateTableStatistics(ThriftHiveMetastore.java:513)
at io.trino.plugin.hive.metastore.thrift.BridgingHiveMetastore.updateTableStatistics(BridgingHiveMetastore.java:129)
at io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.updateTableStatistics(CachingHiveMetastore.java:415)
at io.trino.plugin.hive.HiveMetastoreClosure.updateTableStatistics(HiveMetastoreClosure.java:106)
at io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore$UpdateStatisticsOperation.run(SemiTransactionalHiveMetastore.java:3463)
at io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore$Committer.lambda$executeUpdateStatisticsOperations$19(SemiTransactionalHiveMetastore.java:2195)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
at io.airlift.concurrent.BoundedExecutor.drainQueue(BoundedExecutor.java:80)
... 3 more

@ebyhr
Copy link
Member

ebyhr commented May 20, 2024

Version 389 is too old. Please confirm if the same issue happens with the latest version.

@Shkin1 Shkin1 closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants