Vladimir Sitnikov created CALCITE-1927:
------------------------------------------

             Summary: Mapping for Types.BIT: boolean or BitSet?
                 Key: CALCITE-1927
                 URL: https://issues.apache.org/jira/browse/CALCITE-1927
             Project: Calcite
          Issue Type: Bug
          Components: avatica
    Affects Versions: 1.13.0
            Reporter: Vladimir Sitnikov


Currently Avatica implements `Types.BIT` as `Boolean` (see 
https://github.com/apache/calcite-avatica/blob/4db1fb9c66db8ccebc9e96ce678154ec69c557f0/core/src/main/java/org/apache/calcite/avatica/AvaticaSite.java#L227-L230
 )

Certain databases (e.g. PostgreSQL) have bit(n) and varbit(n) data types that 
are "bit strings" (see 
https://www.postgresql.org/docs/9.6/static/datatype-bit.html )

If both used together, {{getObject}} just blows when trying to convert thing 
like {{'01101'}} to a boolean.

I wonder what should be the behavior for {{Types.BIT}}.
The original discussion is here: https://github.com/pgjdbc/pgjdbc/issues/908

PS. I'm not using Avatica + PostgreSQL + varbit combo yet, however I just want 
to weight different implementation options, and make it simpler for different 
JDBC implementations to talk to each other.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to