Skip to main content
Loading

SQL Support for the Trino Connector

Trino, formerly known as PrestoSQL, supports the ANSI SQL language. The Trino connector uses Trino’s SPI interface to translate SQL language to Aerospike operations using the Aerospike Java client.

Data model

Trino is an SQL engine, but Aerospike is a NoSQL database and is schemaless. The data models are different, as shown in the following table. The Trino connector reconciles those differences to provide a seamless SQL experience. See the Aerospike data model documentation if you are not familiar with it.

AerospikeTrino
ClusterCatalog
NamespaceSchema
SetTable
RecordRow
BinColumn

Data types

The Trino connector does not support all Trino data types. You must typecast unsupported types to supported types.

Aerospike Data TypeTrino Data Type
byte[]VARBINARY
StringVARCHAR
IntegerINTEGER
LongBIGINT
DoubleDOUBLE
FloatDOUBLE
BooleanBOOLEAN
ByteTINYINT
Value.ListValueJSON
Value.MapValueJSON
Value.GeoJSONValueJSON
Value.HLLValueHYPER_LOG_LOG

SQL statements

The Trino connector supports the following SQL statements:

Please note that connector only supports READ_UNCOMMITTED transaction isolation level.