ayushtkn edited a comment on pull request #1187:
URL: https://github.com/apache/hive/pull/1187#issuecomment-651592714
The assertion error is due to the fact both shaded and non shaded jars are
there in classpath.
``` Caused by: java.lang.AssertionError
at
org.apache.calcite.avatica.AvaticaUtils.instantiatePlugin(AvaticaUtils.java:229)
~[avatica-1.12.0.jar:1.12.0]
at
org.apache.calcite.avatica.ConnectionConfigImpl$5.apply(ConnectionConfigImpl.java:392)
~[avatica-1.12.0.jar:1.12.0]
at
org.apache.calcite.avatica.ConnectionConfigImpl$PropEnv.get_(ConnectionConfigImpl.java:173)
~[avatica-1.12.0.jar:1.12.0]
at
org.apache.calcite.avatica.ConnectionConfigImpl$PropEnv.getPlugin(ConnectionConfigImpl.java:296)
~[avatica-1.12.0.jar:1.12.0]
at
org.apache.calcite.avatica.ConnectionConfigImpl$PropEnv.getPlugin(ConnectionConfigImpl.java:282)
~[avatica-1.12.0.jar:1.12.0]
at
org.apache.calcite.config.CalciteConnectionConfigImpl.typeSystem(CalciteConnectionConfigImpl.java:155)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.jdbc.CalciteConnectionImpl.<init>(CalciteConnectionImpl.java:127)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.jdbc.CalciteJdbc41Factory$CalciteJdbc41Connection.<init>(CalciteJdbc41Factory.java:115)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.jdbc.CalciteJdbc41Factory.newConnection(CalciteJdbc41Factory.java:59)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.jdbc.CalciteJdbc41Factory.newConnection(CalciteJdbc41Factory.java:44)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.jdbc.CalciteFactory.newConnection(CalciteFactory.java:53)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:138)
~[avatica-1.12.0.jar:1.12.0]
at java.sql.DriverManager.getConnection(DriverManager.java:664)
~[?:1.8.0_181]
at java.sql.DriverManager.getConnection(DriverManager.java:208)
~[?:1.8.0_181]
at
org.apache.hive.org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:175)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at
org.apache.hive.org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:125)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at
org.apache.hadoop.hive.ql.parse.CalcitePlanner.logicalPlan(CalcitePlanner.java:1555)
~[hive-exec-4.0.0-SNAPSHOT.jar:?]
at
org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:540)
~[hive-exec-4.0.0-SNAPSHOT.jar:?]
```
Post ``at java.sql.DriverManager.getConnection(DriverManager.java:664)
~[?:1.8.0_181]`` rather than coming back to ``hive-exec`` it goes back to the
non shaded jars ``calcite-core``
The driver gets registered with original jar only so it executes call to the
non-shaded ones.
Ideally we can remove the original ones for itests??
Removing that takes away that error, but driver registration is done as
``HiveDriver`` and while getting connection it wants a `jdbc:calcite`
hard-coded in `Framework` class so it gets a:
```
Caused by: java.sql.SQLException: No suitable driver found for jdbc:calcite:
at java.sql.DriverManager.getConnection(DriverManager.java:689)
~[?:1.8.0_181]
at java.sql.DriverManager.getConnection(DriverManager.java:208)
~[?:1.8.0_181]
at
org.apache.hive.org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:175)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
```
Is there are configuration or workaround for the driver-connection. If you
have any idea, Let me know
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]