Skip to content

NPE in JSQLResolver in 5.4-SNAPSHOT #2291

@stbischof

Description

@stbischof
java.lang.NullPointerException: Cannot invoke "java.util.Collection.toArray()" because "c" is null
	at java.base/java.util.ArrayList.addAll(ArrayList.java:752)
	at ai.starlake.transpiler.JSQLResolver.visit(JSQLResolver.java:256)
	at ai.starlake.transpiler.JSQLColumResolver.visit(JSQLColumResolver.java:507)
	at ai.starlake.transpiler.JSQLColumResolver.visit(JSQLColumResolver.java:66)
	at net.sf.jsqlparser.statement.select.PlainSelect.accept(PlainSelect.java:319)
	at ai.starlake.transpiler.JSQLResolver.resolve(JSQLResolver.java:463)
	at org.eclipse.daanse.sql.guard.jsqltranspiler.TranspilerSqlGuard.guard(TranspilerSqlGuard.java:90)
	at org.eclipse.daanse.sql.guard.jsqltranspiler.SqlGuardTest.testAdditionalColumn(SqlGuardTest.java:254)

we test

select *, 5 as testColumn from foo where foo.id  = 10

should be parsed as

SELECT sch.foo.id, sch.foo.name, 5 AS testColumn FROM sch.foo WHERE foo.id = 10

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions