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=allowon 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
workerInfoandmemoryManagerwithworker-infoandmemory-manager. - Remove
optimizer.optimize-hash-generationand theoptimize_hash_generationsession property. - Remove
task.statistics-cpu-timer-enabled. - Remove
prefer_streaming_operators. - Replace
s3.socket-read-timeoutwiths3.socket-timeout. - Replace
gcs.use-access-tokenwithgcs.auth-type; useAPPLICATION_DEFAULTwhen appropriate. - Replace
hive.s3.storage-class-filterwithhive.s3-glacier-filter. - Replace
fs.cache.preferred-hosts-countwith the coordinator settingnode-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
PIVOTturns distinct row values into columns.NEARESTperforms approximate join matching.MATCHandUNIQUEpredicates,BETWEEN SYMMETRICandBETWEEN ASYMMETRIC, and truth-value predicates are available.- Simple
CASEcan place predicates directly inWHEN. (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; thesystem.rollback_to_snapshotprocedure is deprecated. optimize_manifests,expire_snapshots,remove_orphan_files,add_files, andadd_files_from_tablehave the capabilities and metrics documented in the lakehouse reference.- Iceberg
OPTIMIZEfails safely if aNOT NULLcolumn 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.
MERGEsupport includes Ignite and MySQL; PostgreSQL supports it withretry_policy=TASK.- Updates assigning
NULLwork 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 useConnectorPageSource.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 oldType.getObjectValuesignature. - 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.