Expand description
Numeric column types (integers, floats, bool). Numeric column implementations
ClickHouse Documentation:
- Integer Types
- Int8/16/32/64/128, UInt8/16/32/64/128
- Floating-Point Types
- Float32, Float64
- Decimal Types
- Fixed-point numbers
§Integer Types
All integer types are stored in little-endian format:
| Type | Rust Type | Storage | Min | Max |
|---|---|---|---|---|
Int8 | i8 | 1 byte | -128 | 127 |
Int16 | i16 | 2 bytes | -32,768 | 32,767 |
Int32 | i32 | 4 bytes | -2³¹ | 2³¹-1 |
Int64 | i64 | 8 bytes | -2⁶³ | 2⁶³-1 |
Int128 | i128 | 16 bytes | -2¹²⁷ | 2¹²⁷-1 |
UInt8 | u8 | 1 byte | 0 | 255 |
UInt16 | u16 | 2 bytes | 0 | 65,535 |
UInt32 | u32 | 4 bytes | 0 | 2³²-1 |
UInt64 | u64 | 8 bytes | 0 | 2⁶⁴-1 |
UInt128 | u128 | 16 bytes | 0 | 2¹²⁸-1 |
§Floating-Point Types
IEEE 754 floating-point numbers, stored in little-endian:
Float32- Single precision (32-bit)Float64- Double precision (64-bit)
§Bool Type
Bool is an alias for UInt8 where 0 = false, 1 = true.
Structs§
- Column
Vector - Generic column for numeric types
Traits§
- Fixed
Size - Trait for types that can be read/written as fixed-size values (synchronous version for columns)
Type Aliases§
- Column
Date - Column of
Datevalues stored asu16(days since 1970-01-01). - Column
Float32 - Column of
Float32values (IEEE 754 single-precision, little-endian). - Column
Float64 - Column of
Float64values (IEEE 754 double-precision, little-endian). - Column
Int8 - Column of
Int8values (1-byte signed integers). - Column
Int16 - Column of
Int16values (2-byte signed integers, little-endian). - Column
Int32 - Column of
Int32values (4-byte signed integers, little-endian). - Column
Int64 - Column of
Int64values (8-byte signed integers, little-endian). - Column
Int128 - Column of
Int128values (16-byte signed integers, little-endian). - ColumnU
Int8 - Column of
UInt8values (1-byte unsigned integers). - ColumnU
Int16 - Column of
UInt16values (2-byte unsigned integers, little-endian). - ColumnU
Int32 - Column of
UInt32values (4-byte unsigned integers, little-endian). - ColumnU
Int64 - Column of
UInt64values (8-byte unsigned integers, little-endian). - ColumnU
Int128 - Column of
UInt128values (16-byte unsigned integers, little-endian).