0

We are using Calcite version 1.35.0 (Avatica version 1.23.0). We create a connection and add a Schema to it via:

connection = DriverManager.getConnection("jdbc:calcite:");
final CalciteConnection calciteConnection;
calciteConnection = connection.unwrap(CalciteConnection.class);
final SchemaPlus rootSchema = calciteConnection.getRootSchema();
rootSchema.add(DB_SCHEMA, JdbcSchema.create(rootSchema, DB_SCHEMA, dataSource, null, DB_SCHEMA));
return connection;

When querying via JPA against an H2 db that has a table containing a "Binary Large Object" column (a Blob) the following code gets invoked: CalciteJdbc41Connection creates a CalciteJdbc41PreparedStatement which creates a CalciteResultSet (a subclass of AvaticaResultSet) which then creates an ArrayIteratorCursor (a subclass of AbstractCursor) which has this implementation:

public Blob getBlob() throws SQLException {
  throw cannotConvert("Blob");
}

Is there anything I can do to support Blobs/Clobs/Arrays/Refs/etc (they all throw cannotConvert exceptions)? Maybe I'm doing something incorrectly in my Connection initialization. I am NOT initializing anything with the RelOptPlanner like Rules as it didn't appear that I needed to. Is this a limitation of the org.apache.calcite.jdbc.Driver class only supporting org.apache.calcite.jdbc.CalciteJdbc41Factory thus far?

In case it's helpful this is the stackTrace: enter image description here

Tony Falabella
  • 335
  • 1
  • 6
  • 17

0 Answers0