SQL Data Types
Redpanda SQL supports a wide range of data types, each designed to handle specific types of data efficiently.
The following table summarizes the data types supported by Redpanda SQL:
| Data Type | Definition | Format |
|---|---|---|
32-bit signed integer |
one or more digits “0” to “9” |
|
64-bit signed integer |
large numeric/decimal value |
|
32-bit floating point number |
|
|
64-bit floating point number |
|
|
Time and date values without a time zone |
|
|
Date and time values, including the time zone information |
|
|
Date value |
|
|
Time values without any date information |
|
|
Encodes a span of time |
|
|
Boolean value |
|
|
UTF8 encoded string with Unicode support |
‘text’ |
|
Arbitrary binary data (raw bytes) |
|
|
A value in JSON standard format |
|
|
An array of a specific data type |
|
|
A composite value containing fields of different types |
|
|
A spatial data type for planar (Cartesian) point values |
|
|
A spatial data type for geodetic (spherical) point values using WGS84 |
|
|
When performing operations on numeric or temporal types, overflows can lead to undefined behavior, resulting in unexpected values or errors. Ensure input values are within the allowed range for each numeric type to prevent overflows. This can occur during arithmetic operations or function execution (for example, |
|
Explicit casting between types can cause data loss due to altered precision or magnitude, such as truncating fractional seconds in |