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 Internal Error: NullPointerException #3324

Closed
YuanchengJiang opened this issue May 11, 2023 · 1 comment · Fixed by #3333
Closed

Unexpected Internal Error: NullPointerException #3324

YuanchengJiang opened this issue May 11, 2023 · 1 comment · Fixed by #3333
Assignees
Labels
Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution

Comments

@YuanchengJiang
Copy link

Describe the bug

Some queries with join would incur NullPointerException:

2023-05-11T13:12:03.964526Z C i.q.c.p.PGWireServer internal error [ex=
java.lang.NullPointerException: Cannot invoke "io.questdb.griffin.SqlExecutionContext.getNow()" because "this.context" is null
	at io.questdb.griffin.engine.functions.date.NowFunctionFactory$Func.getTimestamp(NowFunctionFactory.java:62)
	at io.questdb.griffin.engine.functions.lt.LtTimestampFunctionFactory$LtTimestampFunction.getBool(LtTimestampFunctionFactory.java:67)
	at io.questdb.griffin.SqlCodeGenerator.generateJoins(SqlCodeGenerator.java:1750)
	at io.questdb.griffin.SqlCodeGenerator.generateSelect(SqlCodeGenerator.java:2676)
	at io.questdb.griffin.SqlCodeGenerator.generateQuery0(SqlCodeGenerator.java:2272)
	at io.questdb.griffin.SqlCodeGenerator.generateQuery(SqlCodeGenerator.java:2259)
	at io.questdb.griffin.SqlCodeGenerator.generateSubQuery(SqlCodeGenerator.java:3620)
	at io.questdb.griffin.SqlCodeGenerator.generateSelectGroupBy(SqlCodeGenerator.java:3114)
	at io.questdb.griffin.SqlCodeGenerator.generateSelect(SqlCodeGenerator.java:2665)
	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)
]

To reproduce

The following query works with the system table telemetry to reproduce the error:

select count(*) from telemetry as a inner join telemetry as b on a.event=b.event where now()=now();

Expected Behavior

No response

Environment

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

Additional context

No response

@bluestreak01 bluestreak01 added Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution labels May 11, 2023
@Rbcoder1
Copy link

I want to work on it

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.

4 participants