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

query failed #1

Open
yxfff opened this issue Aug 14, 2024 · 4 comments
Open

query failed #1

yxfff opened this issue Aug 14, 2024 · 4 comments

Comments

@yxfff
Copy link

yxfff commented Aug 14, 2024

image

hi, I can connect to iris but I get an error when executing the query. The error is as shown in the picture above. Please help me find out where the problem lies.

error message:[%msg: < 需要标识符,找到:^SELECT :%qpar(1) FROM :%qpar>]

@daimor
Copy link
Member

daimor commented Aug 14, 2024

Could you provide more details?
Version of the IRIS
full error

@yxfff
Copy link
Author

yxfff commented Aug 14, 2024

trino version 433
intersystems iris:IRIS for Windows (x86-64) 2024.1 (Build 267.2U) Tue Apr 30 2024 16:41:33 EDT

error log:
2024-08-14T09:53:51.601+0800 ERROR stage-scheduler io.trino.execution.StageStateMachine Stage 20240814_015351_00038_p7tgj.0 failed
io.trino.spi.TrinoException: [SQLCODE: <-1>:<无效 SQL 语句 >]
[Location: ]
[%msg: < 需要标识符,找到:^SELECT :%qpar(1) FROM :%qpar>]
at io.trino.plugin.jdbc.JdbcRecordCursor.handleSqlException(JdbcRecordCursor.java:312)
at io.trino.plugin.jdbc.JdbcRecordCursor.(JdbcRecordCursor.java:124)
at io.trino.plugin.jdbc.JdbcRecordSet.cursor(JdbcRecordSet.java:63)
at io.trino.spi.connector.RecordPageSource.(RecordPageSource.java:37)
at io.trino.split.RecordPageSourceProvider.createPageSource(RecordPageSourceProvider.java:50)
at io.trino.split.PageSourceManager.createPageSource(PageSourceManager.java:61)
at io.trino.operator.TableScanOperator.getOutput(TableScanOperator.java:263)
at io.trino.operator.Driver.processInternal(Driver.java:395)
at io.trino.operator.Driver.lambda$process$8(Driver.java:298)
at io.trino.operator.Driver.tryWithLock(Driver.java:694)
at io.trino.operator.Driver.process(Driver.java:290)
at io.trino.operator.Driver.processForDuration(Driver.java:261)
at io.trino.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:887)
at io.trino.execution.executor.timesharing.PrioritizedSplitRunner.process(PrioritizedSplitRunner.java:187)
at io.trino.execution.executor.timesharing.TimeSharingTaskExecutor$TaskRunner.run(TimeSharingTaskExecutor.java:565)
at io.trino.$gen.Trino_433____20240814_013928_2.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.sql.SQLException: [SQLCODE: <-1>:<无效 SQL 语句 >]
[Location: ]
[%msg: < 需要标识符,找到:^SELECT :%qpar(1) FROM :%qpar>]
at com.intersystems.jdbc.IRISConnection.getServerError(IRISConnection.java:976)
at com.intersystems.jdbc.IRISConnection.processError(IRISConnection.java:1121)
at com.intersystems.jdbc.InStream.readMessageInternal(InStream.java:312)
at com.intersystems.jdbc.InStream.readMessage(InStream.java:201)
at com.intersystems.jdbc.InStream.readMessage(InStream.java:183)
at com.intersystems.jdbc.IRISPreparedStatement.prepareInternal(IRISPreparedStatement.java:598)
at com.intersystems.jdbc.IRISPreparedStatement.prepare(IRISPreparedStatement.java:559)
at com.intersystems.jdbc.IRISPreparedStatement.(IRISPreparedStatement.java:24)
at com.intersystems.jdbc.IRISConnection.getOrCreatePossiblyShardedIRISPreparedStatement(IRISConnection.java:1891)
at com.intersystems.jdbc.IRISConnection.prepareStatement(IRISConnection.java:1422)
at com.intersystems.jdbc.IRISConnection.prepareStatement(IRISConnection.java:277)
at io.opentelemetry.instrumentation.jdbc.internal.OpenTelemetryConnection.prepareStatement(OpenTelemetryConnection.java:84)
at io.trino.plugin.jdbc.ForwardingConnection.prepareStatement(ForwardingConnection.java:54)
at io.trino.plugin.jdbc.ForwardingConnection.prepareStatement(ForwardingConnection.java:54)
at io.trino.plugin.jdbc.BaseJdbcClient.getPreparedStatement(BaseJdbcClient.java:1153)
at io.trino.plugin.jdbc.DefaultQueryBuilder.prepareStatement(DefaultQueryBuilder.java:242)
at io.trino.plugin.jdbc.BaseJdbcClient.buildSql(BaseJdbcClient.java:479)
at io.trino.plugin.jdbc.ForwardingJdbcClient.buildSql(ForwardingJdbcClient.java:199)
at io.trino.plugin.jdbc.jmx.StatisticsAwareJdbcClient.lambda$buildSql$18(StatisticsAwareJdbcClient.java:220)
at io.trino.plugin.jdbc.jmx.JdbcApiStats.wrap(JdbcApiStats.java:34)
at io.trino.plugin.jdbc.jmx.StatisticsAwareJdbcClient.buildSql(StatisticsAwareJdbcClient.java:220)
at io.trino.plugin.jdbc.CachingJdbcClient.buildSql(CachingJdbcClient.java:290)
at io.trino.plugin.jdbc.JdbcRecordCursor.(JdbcRecordCursor.java:120)
... 17 more

@daimor
Copy link
Member

daimor commented Aug 14, 2024

I see that in the error it has :%qpar which is totally unexpected in these places, and this replacement happens in the InterSystems JDBC driver itself, and should be used only for parameters, not in trino-iris

I'll try to reproduce it

@yxfff
Copy link
Author

yxfff commented Aug 14, 2024

I see that in the error it has :%qpar which is totally unexpected in these places, and this replacement happens in the InterSystems JDBC driver itself, and should be used only for parameters, not in trino-iris

I'll try to reproduce it

thank you very much,Waiting for good news, trino-iris is very helpful to me~

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

No branches or pull requests

2 participants