Data Types
NebulaStream provides a simple type-system to specify the data types of schema attributes. In general, we differentiate between primitive types, e.g., Boolean, Integer, and collection. During query optimization, NebulaStream translates the internal logical types to specific physical types.
Boolean
The boolean type can have two states: true
and false
.
Intern Type | Physical Type | C++ Client | Java Client | SQL |
---|---|---|---|---|
Boolean | bool | bool | bool | boolean |
Chars
The char type represents a single character.
Intern Type | Physical Type | C++ | Java | SQL |
---|---|---|---|---|
Char | char | char | char | Char(1) |
Integer Types
This type stores whole numbers, that is, numbers without fractional components, of various ranges.
The internal Integer type is parameterised in the following way:
Integer(bit_size,lower_bound, upper_bound)
.
This allows the NebulaStream to choose an appropriate physical type.
Intern Type | Physical Type | C++ | Java | SQL |
---|---|---|---|---|
Integer(64) | int_64 | int_64 | long | BIGINT |
Integer(64,0) | uint_64 | uint_64 | X | X |
Integer(32) | int_32 | int_32 | int | INT |
Integer(32,0) | u_int32 | uint_32 | X | X |
Integer(16) | int_16 | int_16 | short | SMALLINT |
Integer(16,0) | uint_16 | uint_8 | X | X |
Integer(8) | int_8 | int_8 | byte | TINYINT |
Integer(8,0) | uint_8 | uint_8 | X | X |
Floating-Point Types
The data type enables the representation of variable-precision numeric types. Inexact means that some values cannot be converted exactly to the internal format and are stored as approximations. As a result, storing and retrieving a value might show slight discrepancies.
Intern Type | Physical Type | C++ | Java | SQL |
---|---|---|---|---|
Float(64) | double | double | double | double precision |
Float(32) | float | float | float | real |
Fixed-Sized Arrays
NebulaStream supports fixed-sized array types. These can use any of primitive types as components and represent the data as a dense sequence.
Intern Type | Physical Type | C++ | Java | SQL |
---|---|---|---|---|
Array(Component Type) | Array(Component Type) | type[] | type[] | X |