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.
Aerospike | Trino |
---|---|
Cluster | Catalog |
Namespace | Schema |
Set | Table |
Record | Row |
Bin | Column |
Data types
The Trino connector does not support all Trino data types. You must typecast unsupported types to supported types.
Aerospike Data Type | Trino 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 Trino connector supports the following SQL statements:
- SHOW CATALOGS
- USE
- SHOW SCHEMAS
- SHOW TABLES
- DESCRIBE
- SELECT
- INSERT INTO
- EXPLAIN
- SET SESSION
- RESET SESSION
- SHOW SESSION
- SHOW STATS
Connector only supports READ_UNCOMMITTED
transaction isolation level.