trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
10.49k stars 3.02k forks source link

Accessing `system.metadata.table_comments` table logs "ConnectorMetadata getTableHandle() is not implemented" warning message #24139

Open ebyhr opened 6 days ago

ebyhr commented 6 days ago

Run the following statement with a query runner, e.g. IcebergQueryRunner

SELECT * FROM system.metadata.table_comments 
WHERE catalog_name = 'system' AND  schema_name = 'tpch' AND table_name = 'region';
2024-11-15T17:13:00.907+0900    WARN    SplitRunner-20241115_081300_00025_d3zkx.0.0.0-1-293 io.trino.connector.system.TableCommentSystemTable   Failed to get comment for relation: system.tpch.region
io.trino.spi.TrinoException: ConnectorMetadata getTableHandle() is not implemented
    at io.trino.spi.connector.ConnectorMetadata.getTableHandle(ConnectorMetadata.java:116)
    at io.trino.tracing.TracingConnectorMetadata.getTableHandle(TracingConnectorMetadata.java:142)
    at io.trino.metadata.MetadataManager.lambda$getTableHandle$5(MetadataManager.java:292)
    at java.base/java.util.Optional.flatMap(Optional.java:289)
    at io.trino.metadata.MetadataManager.getTableHandle(MetadataManager.java:283)
    at io.trino.metadata.MetadataManager.getRedirectionAwareTableHandle(MetadataManager.java:1968)
    at io.trino.metadata.MetadataManager.getRedirectionAwareTableHandle(MetadataManager.java:1960)
    at io.trino.tracing.TracingMetadata.getRedirectionAwareTableHandle(TracingMetadata.java:1494)
    at io.trino.connector.system.TableCommentSystemTable.getTableCommentRedirectionAware(TableCommentSystemTable.java:206)
    at io.trino.connector.system.TableCommentSystemTable.getRelationComment(TableCommentSystemTable.java:201)
    at io.trino.connector.system.TableCommentSystemTable.addTableCommentForCatalog(TableCommentSystemTable.java:137)
    at io.trino.connector.system.TableCommentSystemTable.cursor(TableCommentSystemTable.java:120)
    at io.trino.spi.connector.SystemTable.cursor(SystemTable.java:47)
    at io.trino.connector.system.SystemPageSourceProvider$1.cursor(SystemPageSourceProvider.java:140)
    at io.trino.plugin.base.MappedRecordSet.cursor(MappedRecordSet.java:53)
    at io.trino.spi.connector.RecordPageSource.<init>(RecordPageSource.java:37)
    at io.trino.connector.system.SystemPageSourceProvider.createPageSource(SystemPageSourceProvider.java:119)
    at io.trino.split.PageSourceManager$PageSourceProviderInstance.createPageSource(PageSourceManager.java:79)
    at io.trino.operator.ScanFilterAndProjectOperator$SplitToPages.process(ScanFilterAndProjectOperator.java:261)
    at io.trino.operator.ScanFilterAndProjectOperator$SplitToPages.process(ScanFilterAndProjectOperator.java:192)
    at io.trino.operator.WorkProcessorUtils$3.process(WorkProcessorUtils.java:359)
    at io.trino.operator.WorkProcessorUtils$ProcessWorkProcessor.process(WorkProcessorUtils.java:423)
    at io.trino.operator.WorkProcessorUtils$3.process(WorkProcessorUtils.java:346)
    at io.trino.operator.WorkProcessorUtils$ProcessWorkProcessor.process(WorkProcessorUtils.java:423)
    at io.trino.operator.WorkProcessorUtils$3.process(WorkProcessorUtils.java:346)
    at io.trino.operator.WorkProcessorUtils$ProcessWorkProcessor.process(WorkProcessorUtils.java:423)
    at io.trino.operator.WorkProcessorUtils.getNextState(WorkProcessorUtils.java:261)
    at io.trino.operator.WorkProcessorUtils.lambda$processStateMonitor$2(WorkProcessorUtils.java:240)
    at io.trino.operator.WorkProcessorUtils$ProcessWorkProcessor.process(WorkProcessorUtils.java:423)
    at io.trino.operator.WorkProcessorUtils.getNextState(WorkProcessorUtils.java:261)
    at io.trino.operator.WorkProcessorUtils.lambda$finishWhen$3(WorkProcessorUtils.java:255)
    at io.trino.operator.WorkProcessorUtils$ProcessWorkProcessor.process(WorkProcessorUtils.java:423)
    at io.trino.operator.WorkProcessorSourceOperatorAdapter.getOutput(WorkProcessorSourceOperatorAdapter.java:133)
    at io.trino.operator.Driver.processInternal(Driver.java:403)
    at io.trino.operator.Driver.lambda$process$8(Driver.java:306)
    at io.trino.operator.Driver.tryWithLock(Driver.java:709)
    at io.trino.operator.Driver.process(Driver.java:298)
    at io.trino.operator.Driver.processForDuration(Driver.java:269)
    at io.trino.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:890)
    at io.trino.execution.executor.dedicated.SplitProcessor.run(SplitProcessor.java:77)
    at io.trino.execution.executor.dedicated.TaskEntry$VersionEmbedderBridge.lambda$run$0(TaskEntry.java:201)
    at io.trino.$gen.Trino_testversion____20241115_081213_71.run(Unknown Source)
    at io.trino.execution.executor.dedicated.TaskEntry$VersionEmbedderBridge.run(TaskEntry.java:202)
    at io.trino.execution.executor.scheduler.FairScheduler.runTask(FairScheduler.java:172)
    at io.trino.execution.executor.scheduler.FairScheduler.lambda$submit$0(FairScheduler.java:159)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
    at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
    at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:76)
    at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1575)