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

Unexpected ClassCastException with null query #3357

Closed
YuanchengJiang opened this issue May 17, 2023 · 0 comments · Fixed by #3382
Closed

Unexpected ClassCastException with null query #3357

YuanchengJiang opened this issue May 17, 2023 · 0 comments · Fixed by #3382
Labels
Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution

Comments

@YuanchengJiang
Copy link

Describe the bug

java.lang.ClassCastException: class io.questdb.griffin.engine.functions.constants.NullConstant cannot be cast to class io.questdb.griffin.engine.functions.SymbolFunction (io.questdb.griffin.engine.functions.constants.NullConstant and io.questdb.griffin.engine.functions.SymbolFunction are in module io.questdb@7.1.1 of loader 'app')
	at io.questdb.griffin.engine.functions.bool.InSymbolCursorFunctionFactory.newInstance(InSymbolCursorFunctionFactory.java:54)
	at io.questdb.griffin.FunctionParser.checkAndCreateFunction(FunctionParser.java:386)
	at io.questdb.griffin.FunctionParser.createFunction(FunctionParser.java:780)
	at io.questdb.griffin.FunctionParser.visit(FunctionParser.java:311)
	at io.questdb.griffin.PostOrderTreeTraversalAlgo.traverse(PostOrderTreeTraversalAlgo.java:86)
	at io.questdb.griffin.FunctionParser.parseFunction(FunctionParser.java:239)
	at io.questdb.griffin.SqlCodeGenerator.generateSelectVirtualWithSubQuery(SqlCodeGenerator.java:3387)
	at io.questdb.griffin.SqlCodeGenerator.generateSelectVirtual(SqlCodeGenerator.java:3359)
	at io.questdb.griffin.SqlCodeGenerator.generateSelect(SqlCodeGenerator.java:2667)
	at io.questdb.griffin.SqlCodeGenerator.generateQuery0(SqlCodeGenerator.java:2272)
	at io.questdb.griffin.SqlCodeGenerator.generateQuery(SqlCodeGenerator.java:2259)
	at io.questdb.griffin.SqlCodeGenerator.generate(SqlCodeGenerator.java:186)
	at io.questdb.griffin.SqlCompiler.generate(SqlCompiler.java:2731)
	at io.questdb.griffin.SqlCompiler.compileUsingModel(SqlCompiler.java:1322)
	at io.questdb.griffin.SqlCompiler.compileInner(SqlCompiler.java:1271)
	at io.questdb.griffin.SqlCompiler.compileBatch(SqlCompiler.java:322)
	at io.questdb.cutlass.pgwire.PGConnectionContext.processQuery(PGConnectionContext.java:2413)
	at io.questdb.cutlass.pgwire.PGConnectionContext.parse(PGConnectionContext.java:1683)
	at io.questdb.cutlass.pgwire.PGConnectionContext.handleClientOperation(PGConnectionContext.java:418)
	at io.questdb.cutlass.pgwire.PGJobContext.handleClientOperation(PGJobContext.java:89)
	at io.questdb.cutlass.pgwire.PGWireServer$1.lambda$$0(PGWireServer.java:91)
	at io.questdb.network.AbstractIODispatcher.processIOQueue(AbstractIODispatcher.java:189)
	at io.questdb.cutlass.pgwire.PGWireServer$1.run(PGWireServer.java:128)
	at io.questdb.mp.Worker.run(Worker.java:118)

This bug could be similar to #3356. As they gave different exceptions, I create two issues.

To reproduce

select null in null;

Expected Behavior

No response

Environment

- **QuestDB version**: 7.1.1
- **OS**: ubuntu 20.04

Additional context

No response

@bluestreak01 bluestreak01 added Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution labels May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants