Trino Knowledge Patch
Use this skill when a task involves Trino SQL, upgrades, configuration,
connectors, clients, or plugin development. Start with the quick references
below, then open the topic file that matches the task.
Reference index
| Reference |
Topics |
| upgrade-and-correctness.md |
Unsafe releases, runtime requirements, removals, migrations, and correctness fixes |
| sql-language-and-functions.md |
SQL syntax, types, functions, JSON, geospatial behavior, planning, and lineage |
| lakehouse-and-storage.md |
Delta Lake, Hive, Hudi, Lakehouse, object storage, exchange storage, Parquet, and ORC |
| iceberg.md |
Iceberg catalogs, table properties, metadata, maintenance, v3, and safety |
| connectors.md |
Database, analytics, synthetic-data, messaging, and specialized connectors |
| operations-security-and-clients.md |
Runtime, config, auth, resource groups, observability, Web UI, JDBC, and CLI |
| spi-and-plugins.md |
Connector SPI, event APIs, types, blocks, functions, pushdown, and pruning |
How to apply this patch
- Determine the deployed Trino version and the versions of clients and plugins.
- For upgrades, read the upgrade reference before changing configuration.
- For SQL behavior, check both syntax and correctness notes; several changes
alter results rather than merely enabling new syntax.
- For lakehouse catalogs, separate shared native-file-system settings from
connector-specific settings.
- For custom plugins, compile against the target SPI and migrate removed APIs;
deprecated compatibility paths are not sufficient for current releases.
- Prefer the repository's manifests, configuration, code, and tests if they
show behavior more specific than this general guidance.
Breaking changes first
Avoid release 473
Do not deploy release 473. Large GROUP BY or DISTINCT operations with more
than 33 million unique groups can return incorrect results. Release 474 fixes
that defect, but 474 can overcount memory and raise
EXCEEDED_LOCAL_MEMORY_LIMIT; release 475 fixes the memory accounting.
Use the required Java runtime
Build and run current Trino with JDK 25. JDBC and CLI need Java 11 or newer.
When BigQuery or Snowflake is installed, include:
--sun-misc-unsafe-memory-access=allow
When Ignite is installed, also include:
--add-opens=java.base/java.util=ALL-UNNAMED
Remove retired components
- Kinesis, Kudu, Phoenix, and Vertica connectors have been removed.
- The
glue-v1 metastore type and deprecated Databricks Unity Catalog
integrations have been removed.
- RPM packages are not distributed.
- The HTTP server event-listener plugin is not bundled with the server or image.
- Every catalog must be installed on every node.
Migrate native object storage
Delta Lake, Hive, Iceberg, and Lakehouse catalogs must use native clients for
Azure Storage, GCS, IBM Cloud Object Storage, S3, and S3-compatible storage.
fs.hadoop.enabled applies only to HDFS. Alluxio exchange and file-system
support is gone, although its file-system cache remains supported.
For S3, make authentication explicit:
s3.auth-type=WEB_IDENTITY
Use ANONYMOUS for public buckets and IAM_ROLE whenever s3.iam-role is set.
Replace s3.use-web-identity-token-credentials-provider; it is removed.
For GCS, use gcs.auth-type, not removed gcs.use-access-token. Application
default credentials use:
gcs.auth-type=APPLICATION_DEFAULT
Remove defunct core settings
Delete the following before or during migration:
optimize_hash_generation and optimizer.optimize-hash-generation
prefer_streaming_operators
task.statistics-cpu-timer-enabled
enable-large-dynamic-filters and enable_large_dynamic_filters
dynamic-filtering.small* and dynamic-filtering.large-broadcast*
deprecated.http-server.authentication.oauth2.groups-field
Also rename HTTP client prefixes workerInfo and memoryManager to
worker-info and memory-manager.
Correctness triage
When investigating suspicious results, first check the fixes involving:
- Delta deletion vectors,
vacuum, replacement DDL, indexed-Parquet deletes,
and failed-write cleanup
- Iceberg change tables, equality deletes, concurrent
MERGE, partition
evolution, and optimization of invalid NOT NULL data
- spilled grouping, row types, row-pattern
FIRST, window DISTINCT, and
IS NOT DISTINCT FROM
- high-precision JSON,
number values, decimal casts, floating underflow, and
rows wider than 64 fields
- spatial joins, geometry tiling, and the Esri-to-JTS geometry migration
- old-PyArrow Parquet, mismatched decimal metadata, and Hive SerDe timestamps
Read the full correctness matrix before attributing these symptoms to data
corruption.
SQL quick reference
Per-query properties use WITH SESSION:
WITH SESSION query_max_execution_time = '2m'
SELECT * FROM system.runtime.queries;
Columns can be positioned where the connector supports it:
ALTER TABLE customers
ADD COLUMN middle_name varchar AFTER first_name;
Name-aligned sets and automatic grouping are available:
SELECT orderkey, totalprice FROM current_orders
UNION CORRESPONDING
SELECT orderkey, totalprice FROM archived_orders;
SELECT region, status, count(*)
FROM orders
GROUP BY AUTO;
Recent relational and expression syntax includes PIVOT, NEAREST joins,
MATCH, UNIQUE, OVERLAPS, AT LOCAL, named function arguments, method-style
functions, predicate CASE arms, and named row fields.
JSON supports dotted and subscript access with typed methods:
SELECT j.customer.name, j.items[0].price.decimal(18,2), j.*
FROM orders;
number interoperates with boolean, JSON, Python UDFs, and Iceberg materialized
views. Character coercion now flows from char to trimmed varchar semantics;
use the legacy coercion setting only as a temporary bridge.
Iceberg quick reference
- Prefer table-level
rollback_to_snapshot; the system procedure is deprecated.
- Use
optimize_manifests; it works on tables without snapshots.
- Iceberg v3 supports writes, deletes, maintenance, column defaults, row lineage,
nanosecond timestamps, spatial types, and experimental variants.
$files bounds are typed rows, so update numeric subscripts and JSON casts.
- REST catalogs support IAM/SigV4, OAuth exchange, BigLake, vended credentials,
custom headers, prefixed paths, and Application Default Google credentials.
OPTIMIZE now fails safely when invalid nulls occur in NOT NULL columns.
Operations quick reference
- The redesigned Web UI is at
/ui; the former UI is at /ui/legacy and needs
web-ui.legacy.enabled=true.
log.console-format=JSON enables structured console logging.
tracing.exporter.protocol=http/protobuf selects HTTP protobuf trace export.
retry-policy.allowed restricts user-selectable retry policies.
query.max-write-physical-size caps physical writes.
- ANNOUNCE discovery can automatically provision internal TLS.
- OAuth domain filtering uses
http-server.authentication.oauth2.domain-hint.
- Persistent JDBC external-auth tokens use
externalAuthenticationTokenCache=SYSTEM.
Plugin migration quick reference
Current plugin code must account for these removals and replacements:
ConnectorPageSource.getNextPage() to getNextSourcePage() and SourcePage
TypeSignatureParameter family to TypeParameter
Type.getObject and Type.appendTo
- connector-scoped event listeners and several event-listener statistics
- old connector page/sink/table-function provider methods
- old dynamic-filter parameters to columns plus
DynamicFilterSnapshot
- boolean null arrays to bit-packed block validity
Java functions can expose static and instance method syntax with @StaticMethod
and @InstanceMethod, and name arguments with @Name. Connector expression
pushdown supports COALESCE and lambdas.
1---2name: trino-knowledge-patch-23description: Trino4license: MIT5---678# Trino Knowledge Patch910Use this skill when a task involves Trino SQL, upgrades, configuration,11connectors, clients, or plugin development. Start with the quick references12below, then open the topic file that matches the task.1314## Reference index1516| Reference | Topics |17| --- | --- |18| [upgrade-and-correctness.md](references/upgrade-and-correctness.md) | Unsafe releases, runtime requirements, removals, migrations, and correctness fixes |19| [sql-language-and-functions.md](references/sql-language-and-functions.md) | SQL syntax, types, functions, JSON, geospatial behavior, planning, and lineage |20| [lakehouse-and-storage.md](references/lakehouse-and-storage.md) | Delta Lake, Hive, Hudi, Lakehouse, object storage, exchange storage, Parquet, and ORC |21| [iceberg.md](references/iceberg.md) | Iceberg catalogs, table properties, metadata, maintenance, v3, and safety |22| [connectors.md](references/connectors.md) | Database, analytics, synthetic-data, messaging, and specialized connectors |23| [operations-security-and-clients.md](references/operations-security-and-clients.md) | Runtime, config, auth, resource groups, observability, Web UI, JDBC, and CLI |24| [spi-and-plugins.md](references/spi-and-plugins.md) | Connector SPI, event APIs, types, blocks, functions, pushdown, and pruning |2526## How to apply this patch27281. Determine the deployed Trino version and the versions of clients and plugins.292. For upgrades, read the upgrade reference before changing configuration.303. For SQL behavior, check both syntax and correctness notes; several changes31 alter results rather than merely enabling new syntax.324. For lakehouse catalogs, separate shared native-file-system settings from33 connector-specific settings.345. For custom plugins, compile against the target SPI and migrate removed APIs;35 deprecated compatibility paths are not sufficient for current releases.366. Prefer the repository's manifests, configuration, code, and tests if they37 show behavior more specific than this general guidance.3839## Breaking changes first4041### Avoid release 4734243Do not deploy release 473. Large `GROUP BY` or `DISTINCT` operations with more44than 33 million unique groups can return incorrect results. Release 474 fixes45that defect, but 474 can overcount memory and raise46`EXCEEDED_LOCAL_MEMORY_LIMIT`; release 475 fixes the memory accounting.4748### Use the required Java runtime4950Build and run current Trino with JDK 25. JDBC and CLI need Java 11 or newer.51When BigQuery or Snowflake is installed, include:5253```text54--sun-misc-unsafe-memory-access=allow55```5657When Ignite is installed, also include:5859```text60--add-opens=java.base/java.util=ALL-UNNAMED61```6263### Remove retired components6465- Kinesis, Kudu, Phoenix, and Vertica connectors have been removed.66- The `glue-v1` metastore type and deprecated Databricks Unity Catalog67 integrations have been removed.68- RPM packages are not distributed.69- The HTTP server event-listener plugin is not bundled with the server or image.70- Every catalog must be installed on every node.7172### Migrate native object storage7374Delta Lake, Hive, Iceberg, and Lakehouse catalogs must use native clients for75Azure Storage, GCS, IBM Cloud Object Storage, S3, and S3-compatible storage.76`fs.hadoop.enabled` applies only to HDFS. Alluxio exchange and file-system77support is gone, although its file-system cache remains supported.7879For S3, make authentication explicit:8081```properties82s3.auth-type=WEB_IDENTITY83```8485Use `ANONYMOUS` for public buckets and `IAM_ROLE` whenever `s3.iam-role` is set.86Replace `s3.use-web-identity-token-credentials-provider`; it is removed.8788For GCS, use `gcs.auth-type`, not removed `gcs.use-access-token`. Application89default credentials use:9091```properties92gcs.auth-type=APPLICATION_DEFAULT93```9495### Remove defunct core settings9697Delete the following before or during migration:9899- `optimize_hash_generation` and `optimizer.optimize-hash-generation`100- `prefer_streaming_operators`101- `task.statistics-cpu-timer-enabled`102- `enable-large-dynamic-filters` and `enable_large_dynamic_filters`103- `dynamic-filtering.small*` and `dynamic-filtering.large-broadcast*`104- `deprecated.http-server.authentication.oauth2.groups-field`105106Also rename HTTP client prefixes `workerInfo` and `memoryManager` to107`worker-info` and `memory-manager`.108109## Correctness triage110111When investigating suspicious results, first check the fixes involving:112113- Delta deletion vectors, `vacuum`, replacement DDL, indexed-Parquet deletes,114 and failed-write cleanup115- Iceberg change tables, equality deletes, concurrent `MERGE`, partition116 evolution, and optimization of invalid `NOT NULL` data117- spilled grouping, row types, row-pattern `FIRST`, window `DISTINCT`, and118 `IS NOT DISTINCT FROM`119- high-precision JSON, `number` values, decimal casts, floating underflow, and120 rows wider than 64 fields121- spatial joins, geometry tiling, and the Esri-to-JTS geometry migration122- old-PyArrow Parquet, mismatched decimal metadata, and Hive SerDe timestamps123124Read the full correctness matrix before attributing these symptoms to data125corruption.126127## SQL quick reference128129Per-query properties use `WITH SESSION`:130131```sql132WITH SESSION query_max_execution_time = '2m'133SELECT * FROM system.runtime.queries;134```135136Columns can be positioned where the connector supports it:137138```sql139ALTER TABLE customers140ADD COLUMN middle_name varchar AFTER first_name;141```142143Name-aligned sets and automatic grouping are available:144145```sql146SELECT orderkey, totalprice FROM current_orders147UNION CORRESPONDING148SELECT orderkey, totalprice FROM archived_orders;149150SELECT region, status, count(*)151FROM orders152GROUP BY AUTO;153```154155Recent relational and expression syntax includes `PIVOT`, `NEAREST` joins,156`MATCH`, `UNIQUE`, `OVERLAPS`, `AT LOCAL`, named function arguments, method-style157functions, predicate `CASE` arms, and named row fields.158159JSON supports dotted and subscript access with typed methods:160161```sql162SELECT j.customer.name, j.items[0].price.decimal(18,2), j.*163FROM orders;164```165166`number` interoperates with boolean, JSON, Python UDFs, and Iceberg materialized167views. Character coercion now flows from `char` to trimmed `varchar` semantics;168use the legacy coercion setting only as a temporary bridge.169170## Iceberg quick reference171172- Prefer table-level `rollback_to_snapshot`; the system procedure is deprecated.173- Use `optimize_manifests`; it works on tables without snapshots.174- Iceberg v3 supports writes, deletes, maintenance, column defaults, row lineage,175 nanosecond timestamps, spatial types, and experimental variants.176- `$files` bounds are typed rows, so update numeric subscripts and JSON casts.177- REST catalogs support IAM/SigV4, OAuth exchange, BigLake, vended credentials,178 custom headers, prefixed paths, and Application Default Google credentials.179- `OPTIMIZE` now fails safely when invalid nulls occur in `NOT NULL` columns.180181## Operations quick reference182183- The redesigned Web UI is at `/ui`; the former UI is at `/ui/legacy` and needs184 `web-ui.legacy.enabled=true`.185- `log.console-format=JSON` enables structured console logging.186- `tracing.exporter.protocol=http/protobuf` selects HTTP protobuf trace export.187- `retry-policy.allowed` restricts user-selectable retry policies.188- `query.max-write-physical-size` caps physical writes.189- ANNOUNCE discovery can automatically provision internal TLS.190- OAuth domain filtering uses `http-server.authentication.oauth2.domain-hint`.191- Persistent JDBC external-auth tokens use192 `externalAuthenticationTokenCache=SYSTEM`.193194## Plugin migration quick reference195196Current plugin code must account for these removals and replacements:197198- `ConnectorPageSource.getNextPage()` to `getNextSourcePage()` and `SourcePage`199- `TypeSignatureParameter` family to `TypeParameter`200- `Type.getObject` and `Type.appendTo`201- connector-scoped event listeners and several event-listener statistics202- old connector page/sink/table-function provider methods203- old dynamic-filter parameters to columns plus `DynamicFilterSnapshot`204- boolean null arrays to bit-packed block validity205206Java functions can expose static and instance method syntax with `@StaticMethod`207and `@InstanceMethod`, and name arguments with `@Name`. Connector expression208pushdown supports `COALESCE` and lambdas.