show tables command is not working from presto version 315 onwards. Following is the screenshot which shows the error on presto version 316

However, the same command show schemas works on presto version 314

Would you like to use --debug option with presto-cli, reproduce the failure and can you please post the stack trace you get?
presto:default> show schemas;
Query 20190726_070552_00002_y5464 failed: Hive views are not supported: 'information_schema.schemata'
io.prestosql.plugin.hive.HiveViewNotSupportedException: Hive views are not supported: 'information_schema.schemata'
at io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore.lambda$getTable$5(ThriftHiveMetastore.java:236)
at io.prestosql.plugin.hive.metastore.thrift.HiveMetastoreApiStats.lambda$wrap$0(HiveMetastoreApiStats.java:42)
at io.prestosql.plugin.hive.util.RetryDriver.run(RetryDriver.java:130)
at io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore.getTable(ThriftHiveMetastore.java:232)
at io.prestosql.plugin.hive.metastore.thrift.BridgingHiveMetastore.getTable(BridgingHiveMetastore.java:82)
at io.prestosql.plugin.hive.metastore.CachingHiveMetastore.loadTable(CachingHiveMetastore.java:274)
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)
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 io.prestosql.plugin.hive.metastore.CachingHiveMetastore.get(CachingHiveMetastore.java:218)
at io.prestosql.plugin.hive.metastore.CachingHiveMetastore.getTable(CachingHiveMetastore.java:263)
at io.prestosql.plugin.hive.metastore.CachingHiveMetastore.loadTable(CachingHiveMetastore.java:274)
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)
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 io.prestosql.plugin.hive.metastore.CachingHiveMetastore.get(CachingHiveMetastore.java:218)
at io.prestosql.plugin.hive.metastore.CachingHiveMetastore.getTable(CachingHiveMetastore.java:263)
at io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore.getTable(SemiTransactionalHiveMetastore.java:152)
at io.prestosql.plugin.hive.HiveMetadata.getView(HiveMetadata.java:1571)
at io.prestosql.spi.connector.classloader.ClassLoaderSafeConnectorMetadata.getView(ClassLoaderSafeConnectorMetadata.java:432)
at io.prestosql.metadata.MetadataManager.lambda$getView$10(MetadataManager.java:925)
at java.util.Optional.flatMap(Optional.java:241)
at io.prestosql.metadata.MetadataManager.getView(MetadataManager.java:925)
at io.prestosql.sql.analyzer.StatementAnalyzer$Visitor.visitTable(StatementAnalyzer.java:877)
at io.prestosql.sql.analyzer.StatementAnalyzer$Visitor.visitTable(StatementAnalyzer.java:272)
at io.prestosql.sql.tree.Table.accept(Table.java:53)
at io.prestosql.sql.tree.AstVisitor.process(AstVisitor.java:27)
at io.prestosql.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:286)
at io.prestosql.sql.analyzer.StatementAnalyzer$Visitor.analyzeFrom(StatementAnalyzer.java:1879)
at io.prestosql.sql.analyzer.StatementAnalyzer$Visitor.visitQuerySpecification(StatementAnalyzer.java:1040)
at io.prestosql.sql.analyzer.StatementAnalyzer$Visitor.visitQuerySpecification(StatementAnalyzer.java:272)
at io.prestosql.sql.tree.QuerySpecification.accept(QuerySpecification.java:144)
at io.prestosql.sql.tree.AstVisitor.process(AstVisitor.java:27)
at io.prestosql.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:286)
at io.prestosql.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:296)
at io.prestosql.sql.analyzer.StatementAnalyzer$Visitor.visitQuery(StatementAnalyzer.java:742)
at io.prestosql.sql.analyzer.StatementAnalyzer$Visitor.visitQuery(StatementAnalyzer.java:272)
at io.prestosql.sql.tree.Query.accept(Query.java:107)
at io.prestosql.sql.tree.AstVisitor.process(AstVisitor.java:27)
at io.prestosql.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:286)
at io.prestosql.sql.analyzer.StatementAnalyzer.analyze(StatementAnalyzer.java:264)
at io.prestosql.sql.analyzer.Analyzer.analyze(Analyzer.java:76)
at io.prestosql.sql.analyzer.Analyzer.analyze(Analyzer.java:68)
at io.prestosql.execution.SqlQueryExecution.<init>(SqlQueryExecution.java:184)
at io.prestosql.execution.SqlQueryExecution.<init>(SqlQueryExecution.java:92)
at io.prestosql.execution.SqlQueryExecution$SqlQueryExecutionFactory.createQueryExecution(SqlQueryExecution.java:706)
at io.prestosql.dispatcher.LocalDispatchQueryFactory.lambda$createDispatchQuery$0(LocalDispatchQueryFactory.java:118)
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:748)
@kokosing If this issue is solvable by a beginner like me by making some minor changes, please guide me I would like to solve this issue.
I think this code piece is throwing it, in getTable() in ThriftHiveMetastore.
if (table.getTableType().equals(TableType.VIRTUAL_VIEW.name()) && !isPrestoView(table)) {
throw new HiveViewNotSupportedException(new SchemaTableName(databaseName, tableName));
}
@aakashnand Apologies for this regression. this has been fixed recently by @electrum.
Do you have DEBUG logging enabled?
As a workaround, add this to log.properties:
io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastoreClient=INFO
@findepi Thank you. I added io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastoreClient=INFO to log.properties. Could you please share the fixed issue or commit?
@aakashnand Are you capable build presto from the git repo? If so please do so and see if it is already fixed.
@kokosing ok I will try.
Other than that which version of Hive do you use? information_schema.schemata is Presto internal table that is accessible for any Presto catalog. Do you have such object (view in schema (database) information_schema with name schemata) defined in Hive ?
@kokosing good point.
@aakashnand can we continue this on #troubleshooting in Presto Slack (https://prestosql.io/community.html)?
I will fix this soon.
Most helpful comment
I will fix this soon.