VARBINARY
Description
A variable-length binary byte sequence, where M denotes the maximum length (in bytes).
Unlike VARCHAR, it preserves raw bytes without interpreting them using a character set or collation, suitable for arbitrary binary data (e.g., file fragments, hashes, encrypted/compressed data), with a maximum length of 2,147,483,647.
Currently, VARBINARY columns are not supported in created materialized views, or for use in Group By keys, Join Keys, and comparison predicates.
In Core 26.1.3, VARBINARY is available for expressions and supported external catalog mappings. It is not supported as a stored column type in native tables. External binary mappings depend on the connector and the catalog property enable.mapping.varbinary, whose reference default is false.
Future external binary mapping behavior
In a future release, catalogs will always preserve external binary types as VARBINARY; enable.mapping.varbinary=false no longer restores the STRING mapping. Iceberg fixed(N) maps to VARBINARY(N) and UUID to VARBINARY(16), including through Block serialization and data exchange. The file TVF option enable_mapping_varbinary is separate and still defaults to false; enable it explicitly when needed.
Hive Text binary fields use Hive-compatible Base64 encoding and decoding. Conversions involving hexadecimal representations require a 0x prefix and an even number of valid hexadecimal digits; invalid input returns Invalid VARBINARY hex representation.
This support does not enable native binary-column storage in VeloDB Cloud internal tables. VARBINARY cannot be used as a Hash Join or Group By key, in comparison predicates, IN or NOT IN, or in operations such as collect_set that lack binary semantics. A future release adds explicit rejection of these unsupported uses.
keywords
VARBINARY