Hi,
In the calcite connection property document , I saw a property SPARK. Its
description is - "Specifies whether Spark should be used as the engine for
processing that cannot be pushed to the source system"So I thought of testing
it over the CSV adapter. i.e anything which is not implemented by csv adapter ,
use spark for running them. For doing this I followed below steps
1. In pom.xml of csv adapter I added dependency of calcite-spark2. Deleted the
target\dependencies folder3. Started sqline.bat4. Used connection string as
!connect jdbc:calcite:model=target/test-classes/model.json;spark=true admin
admin5. Ran sql query select * from emps;
Is my understanding of this property correct ? Am I setting things up correctly
?Why am I getting the below exception and how to resolve it ?
java.sql.SQLException: Error while executing SQL "select * from emps": null
at org.apache.calcite.avatica.Helper.createException(Helper.java:56)
at org.apache.calcite.avatica.Helper.createException(Helper.java:41)
at
org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:156)
at
org.apache.calcite.avatica.AvaticaStatement.execute(AvaticaStatement.java:209)
at sqlline.Commands.execute(Commands.java:822) at
sqlline.Commands.sql(Commands.java:732) at
sqlline.SqlLine.dispatch(SqlLine.java:813) at
sqlline.SqlLine.begin(SqlLine.java:686) at
sqlline.SqlLine.start(SqlLine.java:398) at
sqlline.SqlLine.main(SqlLine.java:291)Caused by: java.lang.NullPointerException
at
org.apache.calcite.interpreter.Interpreter.<init>(Interpreter.java:74)
at Baz.bind(Unknown Source) at
org.apache.calcite.jdbc.CalcitePrepare$CalciteSignature.enumerable(CalcitePrepare.java:327)
at
org.apache.calcite.jdbc.CalciteConnectionImpl.enumerable(CalciteConnectionImpl.java:295)
at
org.apache.calcite.jdbc.CalciteMetaImpl._createIterable(CalciteMetaImpl.java:553)
at
org.apache.calcite.jdbc.CalciteMetaImpl.createIterable(CalciteMetaImpl.java:544)
at
org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:193)
at
org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:67)
at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:44)
at
org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:607)
at
org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:599)
at
org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:615)
at
org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:148)