Stefan.Manegold at cwi.nl
Wed Oct 21 15:14:11 CEST 2015
our MAL representation of SQL type BOOLEAN is MAL type :bit,
and the C representation of MAL type :bit is (out) C type bit,
which is indeed 1 byte (8 bit) wide, because we need to accommodate 3 values:
TRUE, FALSE & NULL (NIL).
Thus, BOOLEAN columns are (should be) represented by a BAT with tail type (:)bit,
which is (semantically) not the same as type TINYINT / (:)bte.
----- On Oct 21, 2015, at 3:07 PM, Dimitar Nedev dimitar.nedev at monetdbsolutions.com wrote:
> Hey guys,
> A boolean type column seems to fit in a byte, I guess the extra space is to
> represent nulls (since it ain't a qubit). But does that mean that no column
> type is actually ':bit'?
> Given a BAT, how to distinguish between a byte (tinyint) column and a boolean
> developers-list mailing list
> developers-list at monetdb.org
| Stefan.Manegold at CWI.nl | DB Architectures (DA) |
| www.CWI.nl/~manegold/ | Science Park 123 (L321) |
| +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) |
More information about the developers-list