Loading
SQL Support for the Presto Connector
Trino, formerly known as PrestoSQL, supports the ANSI SQL language. The Presto 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 Presto connector reconciles those differences to provide a seamless SQL experience. See the Aerospike data model documentation if you are not familiar with it.
Aerospike | Presto |
---|---|
Cluster | Catalog |
Namespace | Schema |
Set | Table |
Record | Row |
Bin | Column |
Data types
The Presto connector does not support all Presto data types. You must typecast unsupported types to supported types.
Aerospike Data Type | Presto Data Type |
---|---|
byte[] | VARBINARY |
String | VARCHAR |
Integer | INTEGER |
Long | BIGINT |
Double | DOUBLE |
Float | DOUBLE |
Boolean | BOOLEAN |
Byte | TINYINT |
Value.ListValue | JSON |
Value.MapValue | JSON |
Value.GeoJSONValue | JSON |
Value.HLLValue | HYPER_LOG_LOG |
SQL statements
The Presto connector supports the following SQL statements: