Conversion functions
Trino will implicitly convert numeric and character values to the correct type if such a conversion is possible. Trino will not convert between character and numeric types. For example, a query that expects a varchar will not automatically convert a bigint value to an equivalent varchar. When necessary, values can be explicitly cast to a particular type.Conversion functions
cast
try_cast
Formatting
format
format_number
Data size
Theparse_data_size
function supports the following units:
Unit | Description | Value |
---|---|---|
B | Bytes | 1 |
kB | Kilobytes | 1024 |
MB | Megabytes | 10242 |
GB | Gigabytes | 10243 |
TB | Terabytes | 10244 |
PB | Petabytes | 10245 |
EB | Exabytes | 10246 |
ZB | Zettabytes | 10247 |
YB | Yottabytes | 10248 |
parse_data_size
string
of format value unit
into a number, where
value
is the fractional number of unit
values: