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

Missing StorageDescriptor in Hive Glue tables #17643

Closed
rohanpednekar opened this issue Apr 14, 2022 · 5 comments · Fixed by #17655
Closed

Missing StorageDescriptor in Hive Glue tables #17643

rohanpednekar opened this issue Apr 14, 2022 · 5 comments · Fixed by #17655
Assignees

Comments

@rohanpednekar
Copy link
Contributor

Context: https://prestodb.slack.com/archives/C07JH9WMQ/p1649880784944269

com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException: Table StorageDescriptor is null
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2050)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3952)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958)
	at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4964)
	at com.facebook.presto.hive.metastore.CachingHiveMetastore.get(CachingHiveMetastore.java:317)
	at com.facebook.presto.hive.metastore.CachingHiveMetastore.getTable(CachingHiveMetastore.java:362)
	at com.facebook.presto.hive.metastore.SemiTransactionalHiveMetastore.getTable(SemiTransactionalHiveMetastore.java:170)
	at com.facebook.presto.hive.HiveMetadata.getViews(HiveMetadata.java:2262)
	at com.facebook.presto.spi.connector.classloader.ClassLoaderSafeConnectorMetadata.getViews(ClassLoaderSafeConnectorMetadata.java:484)
	at com.facebook.presto.metadata.MetadataManager.getView(MetadataManager.java:1005)
	at com.facebook.presto.sql.analyzer.StatementAnalyzer$Visitor.visitTable(StatementAnalyzer.java:1204)
	at com.facebook.presto.sql.analyzer.StatementAnalyzer$Visitor.visitTable(StatementAnalyzer.java:321)
	at com.facebook.presto.sql.tree.Table.accept(Table.java:53)
	at com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:27)
	at com.facebook.presto.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:335)
	at com.facebook.presto.sql.analyzer.StatementAnalyzer$Visitor.analyzeFrom(StatementAnalyzer.java:2446)
	at com.facebook.presto.sql.analyzer.StatementAnalyzer$Visitor.visitQuerySpecification(StatementAnalyzer.java:1506)
	at com.facebook.presto.sql.analyzer.StatementAnalyzer$Visitor.visitQuerySpecification(StatementAnalyzer.java:321)
	at com.facebook.presto.sql.tree.QuerySpecification.accept(QuerySpecification.java:138)
	at com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:27)
	at com.facebook.presto.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:335)
	at com.facebook.presto.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:345)
	at com.facebook.presto.sql.analyzer.StatementAnalyzer$Visitor.visitQuery(StatementAnalyzer.java:1075)
	at com.facebook.presto.sql.analyzer.StatementAnalyzer$Visitor.visitQuery(StatementAnalyzer.java:321)
	at com.facebook.presto.sql.tree.Query.accept(Query.java:105)
	at com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:27)
	at com.facebook.presto.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:335)
	at com.facebook.presto.sql.analyzer.StatementAnalyzer.analyze(StatementAnalyzer.java:313)
	at com.facebook.presto.sql.analyzer.Analyzer.analyzeSemantic(Analyzer.java:89)
	at com.facebook.presto.execution.SqlQueryExecution.<init>(SqlQueryExecution.java:193)
	at com.facebook.presto.execution.SqlQueryExecution.<init>(SqlQueryExecution.java:98)
	at com.facebook.presto.execution.SqlQueryExecution$SqlQueryExecutionFactory.createQueryExecution(SqlQueryExecution.java:834)
	at com.facebook.presto.dispatcher.LocalDispatchQueryFactory.lambda$createDispatchQuery$0(LocalDispatchQueryFactory.java:123)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.NullPointerException: Table StorageDescriptor is null
	at java.util.Objects.requireNonNull(Objects.java:228)
	at com.facebook.presto.hive.metastore.glue.converter.GlueToPrestoConverter.convertTable(GlueToPrestoConverter.java:69)
	at com.facebook.presto.hive.metastore.glue.GlueHiveMetastore.lambda$getTable$3(GlueHiveMetastore.java:289)
	at java.util.Optional.map(Optional.java:215)
	at com.facebook.presto.hive.metastore.glue.GlueHiveMetastore.getTable(GlueHiveMetastore.java:289)
	at com.facebook.presto.hive.metastore.CachingHiveMetastore.loadTable(CachingHiveMetastore.java:373)
	at com.google.common.cache.CacheLoader$FunctionToCacheLoader.load(CacheLoader.java:165)
	at com.google.common.cache.CacheLoader$1.load(CacheLoader.java:188)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3528)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2277)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
	... 39 more

Can be fixed by trinodb/trino#11092

@rohanpednekar
Copy link
Contributor Author

CC @beinan

@beinan
Copy link
Member

beinan commented Apr 15, 2022

Thank you @rohanpednekar ! I think @ChunxuTang or me would take care of this one once we got a chance

@ChunxuTang
Copy link
Member

Sure, I'm happy to take a look. Looks like this is a useful feature for the Iceberg connector, Delta Lake connector, etc.

@v-jizhang
Copy link
Contributor

Working on it.

@ChunxuTang
Copy link
Member

@v-jizhang Nice! Thanks!

v-jizhang added a commit to v-jizhang/presto that referenced this issue May 17, 2022
Cherry-pick of trinodb/trino#11092

Fixes prestodb#17643

Co-authored-by: Alex <jo.alex2144@gmail.com>
beinan pushed a commit that referenced this issue May 18, 2022
Cherry-pick of trinodb/trino#11092

Fixes #17643

Co-authored-by: Alex <jo.alex2144@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants