You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by JiaTao Tao <ta...@gmail.com> on 2020/09/02 06:51:42 UTC

Re: RelToSqlConverter NullPointerException

Hi tonytao
In your code, you connect pg, can you reproduce this
in RelToSqlConverterTest?

Regards!

Aron Tao


Stamatis Zampetakis <za...@gmail.com> 于2020年8月12日周三 上午5:38写道:

> Thanks for reporting this. Please file a JIRA case with the necessary
> information.
>
> Also it would be helpful if you could refactor your test case as part of
> RelToSqlConverterTest [1].
>
> Best,
> Stamatis
>
> [1]
>
> https://github.com/apache/calcite/blob/master/core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java
>
> On Mon, Aug 10, 2020 at 11:43 AM tonytao <to...@outlook.com> wrote:
>
> > Sorry, the attached file was wrong,please ignore it.
> >
> > I upload a new file.
> >
> > On 8/10/20 4:38 PM, tonytao wrote:
> > > hi team,
> > >
> > > I met a NullPointerException when I used calcite 1.24.0 to convert a
> > > relNode to sqlNode.
> > >
> > > The trace:
> > >
> > > java.lang.NullPointerException
> > >     at java.base/java.util.Objects.requireNonNull(Objects.java:221)
> > >     at
> > >
> >
> org.apache.calcite.rel.rel2sql.RelToSqlConverter.result(RelToSqlConverter.java:152)
> > >     at
> > >
> >
> org.apache.calcite.rel.rel2sql.SqlImplementor.result(SqlImplementor.java:454)
> > >     at
> > >
> >
> org.apache.calcite.rel.rel2sql.SqlImplementor$Builder.result(SqlImplementor.java:1822)
> > >     at
> > >
> >
> org.apache.calcite.rel.rel2sql.RelToSqlConverter.visit(RelToSqlConverter.java:392)
> > >     at server.TestRelToSqlConverter.test(TestRelToSqlConverter.java:84)
> > >
> > >
> > > Attched file is a junit5 test case,you can repeat the issue with this
> > > code.
> > >
> > > Maven configuration:
> > >
> > >         <dependency>
> > >             <groupId>org.apache.calcite</groupId>
> > >             <artifactId>calcite-core</artifactId>
> > >             <version>1.24.0</version>
> > >         </dependency>
> > >         <dependency>
> > >             <groupId>org.apache.commons</groupId>
> > >             <artifactId>commons-dbcp2</artifactId>
> > >             <version>2.7.0</version>
> > >         </dependency>
> > >         <dependency>
> > >             <groupId>org.postgresql</groupId>
> > >             <artifactId>postgresql</artifactId>
> > >             <version>42.2.12</version>
> > >         </dependency>
> > >
> > >
> >
> >
>