d2rq/d2rq — Issue #119: Datatype compatibility issues for HSQLDB
Author: cygri
Created: 2012-03-09 02:52:11+00:00
State: open

* All `INTERVAL` types are mapped to `Types.VARCHAR`, but throw an exception when compared to a string literal. Comparison must be made to an interval literal, such as `LITERAL '1:30' HOUR TO MINUTE`. The reported type name is `INTERVAL HOUR TO MINUTE`, so the fact that it's not really a `VARCHAR` can be detected. The mapping to `VARCHAR` should be considered a bug in HSQLDB. See also #118
* `OTHER` (used in HSQLDB for Java objects) and all `ARRAY` types are treated as non-mappable.
* `BOOLEAN`: Currently handled as numeric, with values 0 and 1 for `FALSE` and `TRUE`. This works, but it would be cleaner to use the SQL literals `TRUE` and `FALSE` directly.
* `BIT` is mapped to plain literals, not very appropriately. See #117
* In HSQLDB 2.2.8, zero-length `BLOBs` and `CLOBs` throw exceptions when compared to something else. This is a [bug in the engine](https://sourceforge.net/tracker/?func=detail&aid=3500034&group_id=23316&atid=378131).
* In HSQLDB 2.2.8, `NaN` when stored in a `DOUBLE` column can behave funny. This is a [bug in the engine](https://sourceforge.net/tracker/?func=detail&aid=3500025&group_id=23316&atid=378131).

All other datatypes have been tested and seem to work.