Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1927

Mapping for Types.BIT: boolean or BitSet?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.14.0
    • None
    • avatica

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            vladimirsitnikov Vladimir Sitnikov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: