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

Failed to get case sensitivity for columns on SQL Server #24624

Open
zhenriquegomes opened this issue Jan 3, 2025 · 0 comments
Open

Failed to get case sensitivity for columns on SQL Server #24624

zhenriquegomes opened this issue Jan 3, 2025 · 0 comments

Comments

@zhenriquegomes
Copy link

zhenriquegomes commented Jan 3, 2025

Any way to bypass this error? I can't change my columns bc it's a legacy database.

io.trino.spi.TrinoException: Error listing table columns for catalog azurespartadb: Failed to get case sensitivity for columns. Invalid column name 'str_TipoAF'.
	at io.trino.metadata.MetadataListing.handleListingException(MetadataListing.java:358)
	at io.trino.metadata.MetadataListing.listTableColumns(MetadataListing.java:254)
	at io.trino.connector.informationschema.InformationSchemaPageSource.addColumnsRecords(InformationSchemaPageSource.java:250)
	at io.trino.connector.informationschema.InformationSchemaPageSource.buildPages(InformationSchemaPageSource.java:218)
	at io.trino.connector.informationschema.InformationSchemaPageSource.getNextPage(InformationSchemaPageSource.java:185)
	at io.trino.operator.ScanFilterAndProjectOperator$ConnectorPageSourceToPages.process(ScanFilterAndProjectOperator.java:381)
	at io.trino.operator.WorkProcessorUtils$ProcessWorkProcessor.process(WorkProcessorUtils.java:423)
	at io.trino.operator.WorkProcessorUtils.getNextState(WorkProcessorUtils.java:261)
	at io.trino.operator.WorkProcessorUtils$YieldingProcess.process(WorkProcessorUtils.java:181)
	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$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$BlockingProcess.process(WorkProcessorUtils.java:207)
	at io.trino.operator.WorkProcessorUtils$ProcessWorkProcessor.process(WorkProcessorUtils.java:423)
	at io.trino.operator.WorkProcessorUtils.lambda$flatten$6(WorkProcessorUtils.java:317)
	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.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_468____20250103_135849_2.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:177)
	at io.trino.execution.executor.scheduler.FairScheduler.lambda$submit$0(FairScheduler.java:164)
	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:75)
	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)
Caused by: io.trino.spi.TrinoException: Failed to get case sensitivity for columns. Invalid column name 'str_TipoAF'.
	at io.trino.plugin.sqlserver.SqlServerClient.getCaseSensitivityForColumns(SqlServerClient.java:530)
	at io.trino.plugin.jdbc.BaseJdbcClient.getColumns(BaseJdbcClient.java:312)
	at io.trino.plugin.jdbc.ForwardingJdbcClient.getColumns(ForwardingJdbcClient.java:108)
	at io.trino.plugin.jdbc.jmx.StatisticsAwareJdbcClient.lambda$getColumns$6(StatisticsAwareJdbcClient.java:129)
	at io.trino.plugin.jdbc.jmx.JdbcApiStats.wrap(JdbcApiStats.java:34)
	at io.trino.plugin.jdbc.jmx.StatisticsAwareJdbcClient.getColumns(StatisticsAwareJdbcClient.java:129)
	at io.trino.plugin.jdbc.RetryingJdbcClient.lambda$getColumns$6(RetryingJdbcClient.java:105)
	at dev.failsafe.Functions.lambda$toCtxSupplier$11(Functions.java:243)
	at dev.failsafe.Functions.lambda$get$0(Functions.java:46)
	at dev.failsafe.internal.RetryPolicyExecutor.lambda$apply$0(RetryPolicyExecutor.java:74)
	at dev.failsafe.SyncExecutionImpl.executeSync(SyncExecutionImpl.java:187)
	at dev.failsafe.FailsafeExecutor.call(FailsafeExecutor.java:376)
	at dev.failsafe.FailsafeExecutor.get(FailsafeExecutor.java:112)
	at io.trino.plugin.jdbc.RetryingModule.retry(RetryingModule.java:67)
	at io.trino.plugin.jdbc.RetryingJdbcClient.getColumns(RetryingJdbcClient.java:105)
	at io.trino.plugin.jdbc.CachingJdbcClient.lambda$getColumns$3(CachingJdbcClient.java:181)
	at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4903)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3574)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2316)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2190)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2080)
	at com.google.common.cache.LocalCache.get(LocalCache.java:4017)
	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4898)
	at io.trino.cache.EvictableCache.get(EvictableCache.java:118)
	at io.trino.plugin.jdbc.CachingJdbcClient.get(CachingJdbcClient.java:804)
	at io.trino.plugin.jdbc.CachingJdbcClient.getColumns(CachingJdbcClient.java:181)
	at io.trino.plugin.jdbc.CachingJdbcClient.lambda$getColumns$3(CachingJdbcClient.java:181)
	at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4903)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3574)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2316)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2190)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2080)
	at com.google.common.cache.LocalCache.get(LocalCache.java:4017)
	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4898)
	at io.trino.cache.EvictableCache.get(EvictableCache.java:118)
	at io.trino.plugin.jdbc.CachingJdbcClient.get(CachingJdbcClient.java:804)
	at io.trino.plugin.jdbc.CachingJdbcClient.getColumns(CachingJdbcClient.java:181)
	at io.trino.plugin.jdbc.JdbcMetadata.getColumns(JdbcMetadata.java:44)
	at io.trino.plugin.jdbc.DefaultJdbcMetadata.getColumnHandles(DefaultJdbcMetadata.java:1079)
	at io.trino.plugin.jdbc.DefaultJdbcMetadata.getColumnMetadata(DefaultJdbcMetadata.java:1105)
	at io.trino.plugin.jdbc.DefaultJdbcMetadata.lambda$listTableColumns$22(DefaultJdbcMetadata.java:1093)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at io.trino.plugin.jdbc.DefaultJdbcMetadata.listTableColumns(DefaultJdbcMetadata.java:1093)
	at io.trino.spi.connector.ConnectorMetadata.streamTableColumns(ConnectorMetadata.java:349)
	at io.trino.spi.connector.ConnectorMetadata.streamRelationColumns(ConnectorMetadata.java:370)
	at io.trino.plugin.jdbc.DefaultJdbcMetadata.streamRelationColumns(DefaultJdbcMetadata.java:1116)
	at io.trino.plugin.base.classloader.ClassLoaderSafeConnectorMetadata.streamRelationColumns(ClassLoaderSafeConnectorMetadata.java:347)
	at io.trino.plugin.base.classloader.ClassLoaderSafeConnectorMetadata.streamRelationColumns(ClassLoaderSafeConnectorMetadata.java:103)
	at io.trino.tracing.TracingConnectorMetadata.streamRelationColumns(TracingConnectorMetadata.java:323)
	at io.trino.metadata.MetadataManager.listTableColumns(MetadataManager.java:703)
	at io.trino.tracing.TracingMetadata.listTableColumns(TracingMetadata.java:357)
	at io.trino.metadata.MetadataListing.doListTableColumns(MetadataListing.java:261)
	at io.trino.metadata.MetadataListing.listTableColumns(MetadataListing.java:251)
	... 48 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name 'str_TipoAF'.
	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:270)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1735)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:929)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:823)
	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7745)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:4391)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:276)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:246)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQueryInternal(SQLServerStatement.java:752)
	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.buildExecuteMetaData(SQLServerPreparedStatement.java:1241)
	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.getMetaData(SQLServerPreparedStatement.java:1217)
	at io.opentelemetry.instrumentation.jdbc.internal.OpenTelemetryPreparedStatement.getMetaData(OpenTelemetryPreparedStatement.java:305)
	at io.trino.plugin.sqlserver.SqlServerClient.getCaseSensitivityForColumns(SqlServerClient.java:514)
	... 100 more
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

1 participant