Trino Knowledge Patch
Use this skill when upgrading, configuring, querying, extending, or
troubleshooting Trino. Start with the upgrade hazards below, then open the
topic reference that matches the work.
Reference index
| Reference |
Topics |
| upgrading-and-correctness.md |
Unsafe releases, runtime requirements, removals, renamed or defunct settings, and correctness fixes |
| sql-language-and-functions.md |
SQL syntax, types, functions, DDL, time travel, authorization statements, and query semantics |
| server-operations-security-observability.md |
Cluster configuration, exchange managers, resource groups, Web UI, authentication, logging, metrics, tracing, and listeners |
| clients-and-drivers.md |
JDBC, CLI, protocol spooling, authentication tokens, headers, and client-visible types and statistics |
| lakehouse-and-object-storage.md |
Delta Lake, Hive, Hudi, Iceberg, Lakehouse, native object storage, metadata tables, and maintenance |
| connectors-and-integrations.md |
Database and service connectors, type mappings, pushdown, connector-specific configuration, additions, and removals |
| spi-and-plugin-development.md |
Connector, block, type, event-listener, function, dynamic-filter, and materialized-view SPI migrations |
Upgrade blockers first
Avoid release 473
Release 473 can return incorrect GROUP BY and DISTINCT results when a query
has more than 33 million unique groups. Use release 474 or later. Release 474
can overcount memory and raise EXCEEDED_LOCAL_MEMORY_LIMIT; that defect is
fixed in release 475.
Match the Java runtime
- The JDBC driver and CLI require Java 11 or newer.
- The server requires JDK 24 starting with release 476.
- Building and running the server requires JDK 25 starting with release 479.
- The BigQuery and Snowflake connectors require
--sun-misc-unsafe-memory-access=allow on the applicable runtime.
- The Ignite connector requires
--add-opens=java.base/java.util=ALL-UNNAMED.
Remove unavailable components
- Kinesis was removed.
- Kudu and Phoenix were removed.
- Vertica was removed.
- RPM packages are no longer published; use a tarball, container image, or a
locally built RPM.
- The HTTP server event-listener plugin is no longer bundled with the server
or container.
- Every catalog must be deployed on every node.
Complete object-storage migration
Delta Lake, Hive, Iceberg, and Lakehouse catalogs must use native Azure, GCS,
S3, or S3-compatible file-system support. Legacy object-store support was
removed; fs.hadoop.enabled now applies only to HDFS. Hudi also uses the
current native storage properties described in the lakehouse reference.
For native S3 authentication, set s3.auth-type explicitly:
s3.auth-type=WEB_IDENTITY
Use ANONYMOUS for public buckets and IAM_ROLE whenever s3.iam-role is
configured. Remove s3.use-web-identity-token-credentials-provider.
Purge defunct configuration
Before starting an upgraded cluster, remove or replace these high-impact
settings:
- Replace HTTP client prefixes
workerInfo and memoryManager with
worker-info and memory-manager.
- Remove
optimizer.optimize-hash-generation and the
optimize_hash_generation session property.
- Remove
task.statistics-cpu-timer-enabled.
- Remove
prefer_streaming_operators.
- Replace
s3.socket-read-timeout with s3.socket-timeout.
- Replace
gcs.use-access-token with gcs.auth-type; use
APPLICATION_DEFAULT when appropriate.
- Replace
hive.s3.storage-class-filter with hive.s3-glacier-filter.
- Replace
fs.cache.preferred-hosts-count with the coordinator setting
node-scheduler.cache-preferred-hosts-count.
- Remove the dynamic-filter settings, Delta Lake live-files cache settings,
removed shared lakehouse properties, and removed Iceberg extended-statistics
settings listed in the upgrade reference.
SQL quick reference
Query-scoped properties
Use WITH SESSION to apply properties to one SELECT; parameters are accepted
in WITH SESSION, SET SESSION, and CALL.
WITH SESSION query_max_execution_time = '2m'
SELECT * FROM system.runtime.queries;
Name-aligned and automatic grouping
SELECT orderkey, totalprice FROM current_orders
UNION CORRESPONDING
SELECT orderkey, totalprice FROM archived_orders;
SELECT region, status, count(*)
FROM orders
GROUP BY AUTO;
New relational forms
PIVOT turns distinct row values into columns.
NEAREST performs approximate join matching.
MATCH and UNIQUE predicates, BETWEEN SYMMETRIC and
BETWEEN ASYMMETRIC, and truth-value predicates are available.
- Simple
CASE can place predicates directly in WHEN.
(start_time, end_time) OVERLAPS (other_start, other_end) tests temporal
overlap.
JSON access
Use dotted and subscripted access on json, typed accessor methods for
conversion, and j.* to collect top-level members:
SELECT j.customer.name, j.items[0].price.decimal(18,2), j.*
FROM orders;
SQL/JSON paths also support like_regex and datetime(). JSON_QUERY cannot
use OMIT QUOTES when returning json.
Defaults, ownership, and refresh
CREATE TABLE orders (id bigint, status varchar DEFAULT 'pending');
ALTER TABLE orders ALTER COLUMN status SET DEFAULT 'pending';
ALTER TABLE orders ALTER COLUMN status DROP DEFAULT;
ALTER MATERIALIZED VIEW lake.sales.monthly SET AUTHORIZATION USER analyst;
ALTER VIEW reporting.orders REFRESH;
Column defaults are connector-dependent; the Memory connector implements the
documented create, add, set, and drop operations.
Time travel and branches
Delta Lake supports FOR TIMESTAMP AS OF. Version and timestamp time-travel
clauses accept query parameters. Trino can also manage and query table
branches; connector access control receives the selected branch.
Lakehouse quick reference
Prefer safe maintenance APIs
- Use Iceberg's table-level
rollback_to_snapshot; the
system.rollback_to_snapshot procedure is deprecated.
optimize_manifests, expire_snapshots, remove_orphan_files, add_files,
and add_files_from_table have the capabilities and metrics documented in
the lakehouse reference.
- Iceberg
OPTIMIZE fails safely if a NOT NULL column contains nulls.
- Delta Lake
vacuum, replacement, deletion-vector, checkpoint, and indexed
Parquet fixes matter when repairing or validating affected tables.
Treat metadata schemas as versioned APIs
Iceberg metadata tables gained new columns and, in the case of $files
lower_bounds and upper_bounds, changed types. Review dependent SQL before
upgrading dashboards or maintenance jobs. Materialized views can be queried
through Iceberg metadata tables.
Tune writer and split limits deliberately
Lakehouse connectors expose Parquet row-group row caps. Hive and Iceberg now
have format-specific split settings, and Iceberg write-size properties persist
under Iceberg-native property names. Removed aliases and session properties
must not remain in automation.
Connector quick reference
- ClickHouse requires ClickHouse 24.3 or newer, or Altinity 22.3 or newer.
- PostgreSQL requires version 12 or newer.
- DuckDB, Loki, and Lakehouse connectors are available.
MERGE support includes Ignite and MySQL; PostgreSQL supports it with
retry_policy=TASK.
- Updates assigning
NULL work across the listed relational connectors.
- Character range pushdown is intentionally restricted for MySQL and SQL
Server to preserve trailing-space semantics.
SPI quick reference
Plugin upgrades require a coordinated source migration:
- Implement
Connector.shutdown() and use
ConnectorPageSource.getNextSourcePage().
- Remove connector-level event listeners and obsolete event-listener methods.
- Replace removed type-parameter classes with
TypeParameter.
- Stop using removed
Type.getObject, Type.appendTo, and the old
Type.getObjectValue signature.
- Adapt dynamic-filter split APIs to columns and
DynamicFilterSnapshot.
- Direct block construction must use bit-packed validity; builder-based code
does not require that direct representation change.
Read the SPI reference before compiling a connector because several related
interfaces changed together.
Working method
- Identify the deployed server release, Java runtime, and affected catalogs.
- Read the upgrade and correctness reference before changing configuration.
- Open the task-specific reference and search for the exact property, method,
connector, SQL construct, or metadata table.
- Prefer the newest stated behavior when a later release reverses or removes
an earlier one.
- Validate changed SQL against representative nulls, high precision values,
old file encodings, and connector pushdown boundaries where relevant.
- Validate configuration on every node, especially catalog files, JVM
options, authentication selection, and removed properties.
1---2name: trino-knowledge-patch3description: Trino4license: MIT5---678# Trino Knowledge Patch910Use this skill when upgrading, configuring, querying, extending, or11troubleshooting Trino. Start with the upgrade hazards below, then open the12topic reference that matches the work.1314## Reference index1516| Reference | Topics |17| --- | --- |18| [upgrading-and-correctness.md](references/upgrading-and-correctness.md) | Unsafe releases, runtime requirements, removals, renamed or defunct settings, and correctness fixes |19| [sql-language-and-functions.md](references/sql-language-and-functions.md) | SQL syntax, types, functions, DDL, time travel, authorization statements, and query semantics |20| [server-operations-security-observability.md](references/server-operations-security-observability.md) | Cluster configuration, exchange managers, resource groups, Web UI, authentication, logging, metrics, tracing, and listeners |21| [clients-and-drivers.md](references/clients-and-drivers.md) | JDBC, CLI, protocol spooling, authentication tokens, headers, and client-visible types and statistics |22| [lakehouse-and-object-storage.md](references/lakehouse-and-object-storage.md) | Delta Lake, Hive, Hudi, Iceberg, Lakehouse, native object storage, metadata tables, and maintenance |23| [connectors-and-integrations.md](references/connectors-and-integrations.md) | Database and service connectors, type mappings, pushdown, connector-specific configuration, additions, and removals |24| [spi-and-plugin-development.md](references/spi-and-plugin-development.md) | Connector, block, type, event-listener, function, dynamic-filter, and materialized-view SPI migrations |2526## Upgrade blockers first2728### Avoid release 4732930Release 473 can return incorrect `GROUP BY` and `DISTINCT` results when a query31has more than 33 million unique groups. Use release 474 or later. Release 47432can overcount memory and raise `EXCEEDED_LOCAL_MEMORY_LIMIT`; that defect is33fixed in release 475.3435### Match the Java runtime3637- The JDBC driver and CLI require Java 11 or newer.38- The server requires JDK 24 starting with release 476.39- Building and running the server requires JDK 25 starting with release 479.40- The BigQuery and Snowflake connectors require41 `--sun-misc-unsafe-memory-access=allow` on the applicable runtime.42- The Ignite connector requires43 `--add-opens=java.base/java.util=ALL-UNNAMED`.4445### Remove unavailable components4647- Kinesis was removed.48- Kudu and Phoenix were removed.49- Vertica was removed.50- RPM packages are no longer published; use a tarball, container image, or a51 locally built RPM.52- The HTTP server event-listener plugin is no longer bundled with the server53 or container.54- Every catalog must be deployed on every node.5556### Complete object-storage migration5758Delta Lake, Hive, Iceberg, and Lakehouse catalogs must use native Azure, GCS,59S3, or S3-compatible file-system support. Legacy object-store support was60removed; `fs.hadoop.enabled` now applies only to HDFS. Hudi also uses the61current native storage properties described in the lakehouse reference.6263For native S3 authentication, set `s3.auth-type` explicitly:6465```properties66s3.auth-type=WEB_IDENTITY67```6869Use `ANONYMOUS` for public buckets and `IAM_ROLE` whenever `s3.iam-role` is70configured. Remove `s3.use-web-identity-token-credentials-provider`.7172### Purge defunct configuration7374Before starting an upgraded cluster, remove or replace these high-impact75settings:7677- Replace HTTP client prefixes `workerInfo` and `memoryManager` with78 `worker-info` and `memory-manager`.79- Remove `optimizer.optimize-hash-generation` and the80 `optimize_hash_generation` session property.81- Remove `task.statistics-cpu-timer-enabled`.82- Remove `prefer_streaming_operators`.83- Replace `s3.socket-read-timeout` with `s3.socket-timeout`.84- Replace `gcs.use-access-token` with `gcs.auth-type`; use85 `APPLICATION_DEFAULT` when appropriate.86- Replace `hive.s3.storage-class-filter` with `hive.s3-glacier-filter`.87- Replace `fs.cache.preferred-hosts-count` with the coordinator setting88 `node-scheduler.cache-preferred-hosts-count`.89- Remove the dynamic-filter settings, Delta Lake live-files cache settings,90 removed shared lakehouse properties, and removed Iceberg extended-statistics91 settings listed in the upgrade reference.9293## SQL quick reference9495### Query-scoped properties9697Use `WITH SESSION` to apply properties to one `SELECT`; parameters are accepted98in `WITH SESSION`, `SET SESSION`, and `CALL`.99100```sql101WITH SESSION query_max_execution_time = '2m'102SELECT * FROM system.runtime.queries;103```104105### Name-aligned and automatic grouping106107```sql108SELECT orderkey, totalprice FROM current_orders109UNION CORRESPONDING110SELECT orderkey, totalprice FROM archived_orders;111112SELECT region, status, count(*)113FROM orders114GROUP BY AUTO;115```116117### New relational forms118119- `PIVOT` turns distinct row values into columns.120- `NEAREST` performs approximate join matching.121- `MATCH` and `UNIQUE` predicates, `BETWEEN SYMMETRIC` and122 `BETWEEN ASYMMETRIC`, and truth-value predicates are available.123- Simple `CASE` can place predicates directly in `WHEN`.124- `(start_time, end_time) OVERLAPS (other_start, other_end)` tests temporal125 overlap.126127### JSON access128129Use dotted and subscripted access on `json`, typed accessor methods for130conversion, and `j.*` to collect top-level members:131132```sql133SELECT j.customer.name, j.items[0].price.decimal(18,2), j.*134FROM orders;135```136137SQL/JSON paths also support `like_regex` and `datetime()`. `JSON_QUERY` cannot138use `OMIT QUOTES` when returning `json`.139140### Defaults, ownership, and refresh141142```sql143CREATE TABLE orders (id bigint, status varchar DEFAULT 'pending');144ALTER TABLE orders ALTER COLUMN status SET DEFAULT 'pending';145ALTER TABLE orders ALTER COLUMN status DROP DEFAULT;146ALTER MATERIALIZED VIEW lake.sales.monthly SET AUTHORIZATION USER analyst;147ALTER VIEW reporting.orders REFRESH;148```149150Column defaults are connector-dependent; the Memory connector implements the151documented create, add, set, and drop operations.152153### Time travel and branches154155Delta Lake supports `FOR TIMESTAMP AS OF`. Version and timestamp time-travel156clauses accept query parameters. Trino can also manage and query table157branches; connector access control receives the selected branch.158159## Lakehouse quick reference160161### Prefer safe maintenance APIs162163- Use Iceberg's table-level `rollback_to_snapshot`; the164 `system.rollback_to_snapshot` procedure is deprecated.165- `optimize_manifests`, `expire_snapshots`, `remove_orphan_files`, `add_files`,166 and `add_files_from_table` have the capabilities and metrics documented in167 the lakehouse reference.168- Iceberg `OPTIMIZE` fails safely if a `NOT NULL` column contains nulls.169- Delta Lake `vacuum`, replacement, deletion-vector, checkpoint, and indexed170 Parquet fixes matter when repairing or validating affected tables.171172### Treat metadata schemas as versioned APIs173174Iceberg metadata tables gained new columns and, in the case of `$files`175`lower_bounds` and `upper_bounds`, changed types. Review dependent SQL before176upgrading dashboards or maintenance jobs. Materialized views can be queried177through Iceberg metadata tables.178179### Tune writer and split limits deliberately180181Lakehouse connectors expose Parquet row-group row caps. Hive and Iceberg now182have format-specific split settings, and Iceberg write-size properties persist183under Iceberg-native property names. Removed aliases and session properties184must not remain in automation.185186## Connector quick reference187188- ClickHouse requires ClickHouse 24.3 or newer, or Altinity 22.3 or newer.189- PostgreSQL requires version 12 or newer.190- DuckDB, Loki, and Lakehouse connectors are available.191- `MERGE` support includes Ignite and MySQL; PostgreSQL supports it with192 `retry_policy=TASK`.193- Updates assigning `NULL` work across the listed relational connectors.194- Character range pushdown is intentionally restricted for MySQL and SQL195 Server to preserve trailing-space semantics.196197## SPI quick reference198199Plugin upgrades require a coordinated source migration:200201- Implement `Connector.shutdown()` and use202 `ConnectorPageSource.getNextSourcePage()`.203- Remove connector-level event listeners and obsolete event-listener methods.204- Replace removed type-parameter classes with `TypeParameter`.205- Stop using removed `Type.getObject`, `Type.appendTo`, and the old206 `Type.getObjectValue` signature.207- Adapt dynamic-filter split APIs to columns and `DynamicFilterSnapshot`.208- Direct block construction must use bit-packed validity; builder-based code209 does not require that direct representation change.210211Read the SPI reference before compiling a connector because several related212interfaces changed together.213214## Working method2152161. Identify the deployed server release, Java runtime, and affected catalogs.2172. Read the upgrade and correctness reference before changing configuration.2183. Open the task-specific reference and search for the exact property, method,219 connector, SQL construct, or metadata table.2204. Prefer the newest stated behavior when a later release reverses or removes221 an earlier one.2225. Validate changed SQL against representative nulls, high precision values,223 old file encodings, and connector pushdown boundaries where relevant.2246. Validate configuration on every node, especially catalog files, JVM225 options, authentication selection, and removed properties.