heavyai / heavyai-jdbc

A JDBC driver for connecting to an HeavyAI GPU database and running queries.

Home Page:https://www.heavy.ai/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[DBeaver] setSchema not supported

randyzwitch opened this issue · comments

When opening the SQL Editor, DBeaver throws the following error:

Not supported yet, line:776 class:com.omnisci.jdbc.OmniSciConnection method:setSchema

image

Indeed, it looks like the jdbc method setSchema is not supported.

However, there is a workaround that can be configured in DBeaver:

If you go to the "Edit connection" menu, and then into "Edit Driver Settings", and then into the "Advanced Parameters" tab, scroll until you see an option called "Omit Schemas". If you check that checkbox, save changes and reconnect, queries from the SQL editor should work for now on. This way, DBeaver will stop trying to launch a setSchema method.

Thanks @julioasotodv, I should probably submit a PR to DBeaver to enable that by default

I can confirm this workaround solves the issue, thanks @julioasotodv. We're discussing this internally on what the proper fix might be, including possibly just submitting this to the DBeaver repo

image

As per javadocs https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html#setSchema-java.lang.String-

If the driver does not support schemas, it will silently ignore this request.

So maybe don't throw an exception when setSchema is called.

The getSchema method says:

Returns:
the current schema name or null if there is none

So maybe just return null instead of throwing an exception