This problem keeps on coming up. Avatica doesn't handle extended data
types very well. I think we hard-code support for everything in
java.sql.Types but then we hit the wall when things are "OTHER".

There are also types that are widely used that are not in
java.sql.Types - e.g. GEOMETRY. They may or may not have an accepted
integer type id.

I would love to find a robust solution. Especially to be able to add a
new type on the server without modifying the wire protocol or the
Avatica client.

We should make more use of JDBC type maps, e.g.
"ResultSet.getObject(int, Map<String, Class>)" [1]

Julian

[1] 
https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSet.html#getObject-int-java.util.Map-

On Wed, Jun 3, 2020 at 10:44 AM Jon Pither <[email protected]> wrote:
>
> Hi,
>
> I have a data-type I'm mapping as SqlTypeName/OTHER - in this case
> java.util.UUID. When I return this field from an enumerator via an adapter
> it works OK - the UUID is passed through into the JDBC result set.
>
> Over the wire though, Avatica throws an error " Remote driver error:
> RuntimeException: Unhandled type in Frame: class java.util.UUID".
>
> I'm contemplating what to do here - is it possible to convert the UUID to a
> string in the case of 'on the wire' for avatica only? But then pass through
> the UUID for straight through Calcite?
>
> Regards,
>
> Jon.

Reply via email to