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

SHOW STATS fails for query returning boolean #9710

Closed
findepi opened this issue Oct 20, 2021 · 0 comments · Fixed by #9711 or #9712
Closed

SHOW STATS fails for query returning boolean #9710

findepi opened this issue Oct 20, 2021 · 0 comments · Fixed by #9711 or #9712
Assignees
Labels
bug Something isn't working
Milestone

Comments

@findepi
Copy link
Member

findepi commented Oct 20, 2021

trino> SHOW STATS FOR (SELECT true);
Query 20211020_142940_00001_2eprz failed: Unexpected type: boolean
java.lang.IllegalArgumentException: Unexpected type: boolean
	at io.trino.sql.rewrite.ShowStatsRewrite$Visitor.toStringLiteral(ShowStatsRewrite.java:231)
	at io.trino.sql.rewrite.ShowStatsRewrite$Visitor.rewriteShowStats(ShowStatsRewrite.java:163)
	at io.trino.sql.rewrite.ShowStatsRewrite$Visitor.visitShowStats(ShowStatsRewrite.java:131)
	at io.trino.sql.rewrite.ShowStatsRewrite$Visitor.visitShowStats(ShowStatsRewrite.java:104)
	at io.trino.sql.tree.ShowStats.accept(ShowStats.java:45)
	at io.trino.sql.tree.AstVisitor.process(AstVisitor.java:27)
	at io.trino.sql.rewrite.ShowStatsRewrite.rewrite(ShowStatsRewrite.java:101)
	at io.trino.sql.rewrite.StatementRewrite.rewrite(StatementRewrite.java:61)
	at io.trino.sql.analyzer.Analyzer.analyze(Analyzer.java:88)
	at io.trino.sql.analyzer.Analyzer.analyze(Analyzer.java:83)
	at io.trino.execution.SqlQueryExecution.analyze(SqlQueryExecution.java:269)
	at io.trino.execution.SqlQueryExecution.<init>(SqlQueryExecution.java:190)
	at io.trino.execution.SqlQueryExecution$SqlQueryExecutionFactory.createQueryExecution(SqlQueryExecution.java:806)
	at io.trino.dispatcher.LocalDispatchQueryFactory.lambda$createDispatchQuery$0(LocalDispatchQueryFactory.java:132)
	at io.trino.$gen.Trino_363____20211020_142918_2.call(Unknown Source)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
@findepi findepi added the bug Something isn't working label Oct 20, 2021
@findepi findepi self-assigned this Oct 20, 2021
@findepi findepi added this to the 364 milestone Oct 22, 2021
@findepi findepi mentioned this issue Oct 22, 2021
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

1 participant