Alexander Falb created CALCITE-4855:
---------------------------------------
Summary: SQLFeatureNotSupported with avatica-remote and MariaDB
Key: CALCITE-4855
URL: https://issues.apache.org/jira/browse/CALCITE-4855
Project: Calcite
Issue Type: Bug
Components: avatica
Affects Versions: avatica-1.19.0, 1.27.0
Reporter: Alexander Falb
I'm currently experimenting with a Calcite/Avatica-Remote Javaapplicatioin and
MariaDB server.
When connecting directly to the MariaDB (without Calcite)
"jdbc:mariadb://localhost..." my PreparedStatement prepares and executes just
fine, the same holds true when using only Calcite
"jdbc:calcite:schemaType=JDBC;schema.jdbcUrl=jdbc:mariadb://localhost..."
But as soon as I start the standalone Avatica server (same MariaDB server, same
MariaDB JDBC driver version) and connect through it
"jdbc:avatica:remote:url=..." I get the following exception on my
clientapplication when preparing my PreparedStatement:
{code:java}
org.apache.calcite.avatica.AvaticaSqlException: Error -1 (00000) : while
preparing SQL: SELECT id FROM ent WHERE col = ?
at org.apache.calcite.avatica.Helper.createException(Helper.java:54)
at org.apache.calcite.avatica.Helper.createException(Helper.java:41)
at
org.apache.calcite.avatica.AvaticaConnection.prepareStatement(AvaticaConnection.java:358)
at
org.apache.calcite.avatica.AvaticaConnection.prepareStatement(AvaticaConnection.java:175)
{code}
I started debugging the avatica server and found the cause:
{code:java}
java.sql.SQLFeatureNotSupportedException: Getting parameter type metadata are
not supported
at
org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:54)
at
org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.notSupported(ExceptionFactory.java:172)
at
org.mariadb.jdbc.MariaDbParameterMetaData.getParameterType(MariaDbParameterMetaData.java:133)
at
org.apache.calcite.avatica.jdbc.JdbcMeta.parameters(JdbcMeta.java:277)
at org.apache.calcite.avatica.jdbc.JdbcMeta.signature(JdbcMeta.java:288)
at org.apache.calcite.avatica.jdbc.JdbcMeta.prepare(JdbcMeta.java:721)
at
org.apache.calcite.avatica.remote.LocalService.apply(LocalService.java:201)
{code}
It looks like MariaDB does not support getParameterType(int param):
[https://jira.mariadb.org/browse/CONJ-568] and
[https://jira.mariadb.org/browse/MDEV-15031].
Is there a way to prevent avatica-server from calling this method?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)