Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


IDIEP-92
Author Aleksey
Sponsor
Created

 

Status
Status
colourGrey
titleDRAFT

...

  • 0 for all integer types;
  • 0.0 for floating point types;
  • 00000000-0000-0000-0000-000000000000 for UUID;
  • 00:00:00.000000 for time;
  • Jan 1, 1970 00:00:00.000000 for timestamp;
  • Jan 1, 1 BC for date (as 1 BC immediately precedes 1 AD in the Gregorian calendar).

Integer Field Compression

...

Thus for integer values it is possible to keep only their significant bytes, omitting their high insignificant bytes. That is even if the original data type of a field is INTEGER and should occupy 4 bytes but the actual value is below 128 and above -129 then we can store it just as a single byte and reflect this in the offset table.

For signed integers the most significant bit is the sign bit. Thus a compressed signed integer must be sign-extended on decompression.

In SQL standard there are no unsigned integers. So support of unsigned integers may be omitted. But if for reason such support becomes needed then a compressed unsigned integer must be zero-extended.

Corollary

If the number of fields is N and t is an array that stores a binary tuple we can find the answers for the following:

...