Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Trino Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-trino-knowledge-patch)
---
name: trino-knowledge-patch
description: Trino
version: "484"
license: MIT
metadata:
author: Nevaberry
---
# Trino Knowledge Patch
Load this skill when upgrading Trino, writing SQL, configuring connectors or storage,
integrating JDBC and CLI clients, or updating connector and event listener plugins.
Use the quick reference for common migrations and open the relevant topic file for
the full guidance, examples, correctness fixes, and version-specific behavior.
## Reference index
| Reference | Topics |
| --- | --- |
| [Upgrade and correctness](references/upgrade-and-correctness.md) | Runtime requirements, packaging, removed server settings, aggregation and execution fixes |
| [SQL language and functions](references/sql-language-and-functions.md) | Query syntax, predicates, defaults, JSON, intervals, geometry, functions and UDFs |
| [Operations, security, and clients](references/operations-security-and-clients.md) | Resource groups, exchanges, authentication, observability, JDBC, CLI and Web UI |
| [Lakehouse and storage](references/lakehouse-and-storage.md) | Lakehouse, Delta Lake, Hive, Hudi, native file systems, caches, Parquet and ORC |
| [Iceberg](references/iceberg.md) | Table properties, metadata, maintenance, views, REST catalogs and encryption |
| [Other connectors](references/connectors.md) | Database requirements, type mappings, writes, Faker, connector settings and removals |
| [SPI and plugin development](references/spi-and-plugins.md) | Connector lifecycle, metadata, pages, blocks, types, dynamic filters and access control |
## Upgrade and breaking changes
### Runtime and deployment
- Use JDK 25 to build Trino and run the server; run the JDBC driver and CLI on Java 11 or later.
- Deploy each catalog on every node; the server enforces this requirement.
- The server RPM package was removed. Use the server tarball or container image,
or build an RPM using the [packaging repository](https://github.com/trinodb/trino-packages).
- The example HTTP connector is absent from the server tarball and Docker image.
Deploy the HTTP server event listener plugin separately if your configuration uses it.
- The hardened Docker runtime lacks `grep`, `dnf`, and `useradd`; the `ppc64le` image is removed.
With `run-trino` removed, set `node.id=${ENV:HOSTNAME}` in custom `node.properties` files.
- When running the BigQuery or Snowflake connector, add `--sun-misc-unsafe-memory-access=allow`
to the server JVM configuration. For Ignite, add `--add-opens=java.base/java.util=ALL-UNNAMED`.
### Correctness and external systems
Avoid release 473: `GROUP BY` or `DISTINCT` queries with more than 33 million unique
groups can return incorrect results. Release 474 fixes that corruption but can cause
spurious `EXCEEDED_LOCAL_MEMORY_LIMIT` failures; release 475 fixes that memory accounting error.
- Remove Kinesis and Vertica catalogs before upgrading; Kudu and Phoenix connectors were also removed.
- The ClickHouse connector requires ClickHouse 24.3 or later, or Altinity 22.3 or later.
The PostgreSQL and Cassandra connectors require PostgreSQL 12 or later and Cassandra 4.0 or later, respectively.
- MySQL and SingleStore drop read support for `BIT(n)` columns with `n > 1`.
- MySQL and SQL Server stop pushing down character inequalities and ranges.
SQL Server `DELETE` and `UPDATE` fail when they require that pushdown.
### Removed and renamed 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` and the `prefer_streaming_operators` session property.
- Remove `enable-large-dynamic-filters`, `dynamic-filtering.small*`, and
`dynamic-filtering.large-broadcast*`, plus the `enable_large_dynamic_filters` session setting.
- Remove `deprecated.http-server.authentication.oauth2.groups-field`.
- Use plain `EXPLAIN`; `EXPLAIN (TYPE LOGICAL)` and `EXPLAIN (TYPE DISTRIBUTED)` are deprecated.
- `system.runtime.tasks` adds `internal_network_input_bytes` and drops `raw_input_bytes`
and `raw_input_rows`; update queries and dashboards that select the dropped columns.
### SQL compatibility
- Mixed `char` and `varchar` expressions coerce `char` to `varchar`, trimming its trailing spaces.
Comparisons then use `varchar` semantics, where trailing spaces are significant.
Restore the old direction with `deprecated.legacy-varchar-to-char-coercion=true`, or use
`SET SESSION legacy_varchar_to_char_coercion = true` for the current session.
- Decimal arithmetic uses revised precision and scale inference. Set
`deprecated.legacy-arithmetic-decimal-operators=true` to restore the previous behavior.
- Remove `OMIT QUOTES` from `JSON_QUERY` with `RETURNING json`; use a character return type
if scalar string results need their quotes omitted.
- Quote identifiers named `"JSON_SERIALIZE"` and qualify user-defined functions named `json`.
- Geometry input requires OGC-conforming WKT. The legacy repair setting for topologically
invalid overlay inputs is documented in the SQL reference.
- `GRANT`, `REVOKE`, `SET AUTHORIZATION`, and `CREATE SCHEMA` preserve user name case.
Match the authenticated spelling, such as `Alice`, and use lowercase role names.
## Storage and connector migrations
### Native storage, authentication, and caching
Migrate Delta Lake, Hive, Iceberg, and Lakehouse catalogs to native file systems for
Azure Storage, Google Cloud Storage, IBM Cloud Object Storage, S3, and S3-compatible systems.
`fs.hadoop.enabled` now applies only to HDFS. Migrate fault-tolerant exchanges off Alluxio storage;
Alluxio use in Delta Lake, Hive, Hudi, and Iceberg is limited to file-system caching.
- In Delta Lake, Hive, Hudi, and Iceberg, replace `s3.socket-read-timeout` with `s3.socket-timeout`.
- In Delta Lake, Hive, Hudi, Iceberg, and Lakehouse, set `s3.auth-type=IAM_ROLE` when
`s3.iam-role` is configured; migrate `s3.use-web-identity-token-credentials-provider` to
`s3.auth-type=WEB_IDENTITY`. Use `s3.auth-type=ANONYMOUS` to read public buckets.
- In Delta Lake, Hive, Hudi, and Iceberg, use `gcs.auth-type=APPLICATION_DEFAULT` for
application default credentials. `SERVICE_ACCOUNT` requires credentials; remove `gcs.use-access-token`.
- Replace catalog `fs.cache.preferred-hosts-count` with coordinator `node-scheduler.cache-preferred-hosts-count`.
- Configure the shared cache with `cache-manager.config-files`. For Hive, Delta Lake, Iceberg,
and Lakehouse, enable `fs.cache.enabled` in the catalog and move `fs.cache.directories`,
`fs.cache.max-sizes`, `fs.cache.max-disk-usage-percentages`, `fs.cache.ttl`, and
`fs.cache.page-size` into the `alluxio` cache manager configuration.
### Table formats and Iceberg properties
- New Delta Lake data files default to `ZSTD`, previously `SNAPPY`.
- Hive and Lakehouse default `hive.storage-format` to `PARQUET`; set `hive.storage-format=ORC` to keep ORC.
- Delta Lake disallows `DROP TABLE` for UniForm tables. `system.vacuum` supports deletion-vector tables.
- Iceberg uses the `rollback_to_snapshot` table procedure; `system.rollback_to_snapshot` is deprecated.
- Set Iceberg `compression_codec` on the table; remove uses of its session property.
- Move Iceberg `target_max_file_size` and `parquet_writer_row_group_size` from session settings
to table properties. The `parquet_writer_block_size` session alias is removed.
- Replace Iceberg `experimental_split_size` with catalog `iceberg.max-split-size` or session `max_split_size`.
- Iceberg `$files` exposes `lower_bounds` and `upper_bounds` as typed rows; use named field access
instead of field-ID map lookups and map-to-JSON casts where individual bounds are needed.
- Remove `iceberg.equality-deletes-blocks-hash-enabled` from Iceberg and Lakehouse configurations.
- With `iceberg.rest-catalog.vended-credentials-enabled=true`, enable the warehouse's native file system.
For `GOOGLE` security in Iceberg and Lakehouse, migrate catalog service-account keys from
`gcs.json-key-file-path` to `iceberg.rest-catalog.google-json-key-file-path` or `iceberg.rest-catalog.google-json-key`.
## Plugin migration essentials
- Implement `ConnectorPageSource.getNextSourcePage()` returning `SourcePage`;
remove deprecated `ConnectorPageSource.getNextPage()` implementations.
- Update `ConnectorSplitManager.getSplits` to receive dynamic filter columns instead of `DynamicFilter`.
`ConnectorSplitSource.getNextBatch` receives the current predicate in `DynamicFilterSnapshot`.
- Use `ConnectorExpressionEvaluator` for partition and split pruning; the predicate was removed from `Constraint`.
- Page sources can report memory through the engine-provided `MemoryContext`. Report memory shared
by page sources through the `MemoryContext` parameter to `ConnectorPageSourceProviderFactory.createPageSourceProvider()`.
`ConnectorPageSourceProvider.getMemoryUsage()` is removed; `createMergeSink()` requires a `MemoryContext`.
- Direct block construction uses bit-packed validity bitmaps. Direct `BooleanType` block access
and construction changes from `ByteArrayBlock` to `BitArrayBlock`.
- Replace `Slice` with `io.trino.json.Json` for native JSON values. Day-time intervals use microseconds;
recompile for changed `StandardTypes.INTERVAL_DAY_TO_SECOND` and `StandardTypes.INTERVAL_YEAR_TO_MONTH` values.
- Update `ConnectorMetadata.finishMerge()` to return `Optional<ConnectorOutputMetadata>`.
- See the SPI reference for the remaining removed methods, type parameter migrations, and access checks.
## SQL quick reference
### Query-local settings and grouping
`WITH SESSION` applies properties to a `SELECT` and is rejected on non-`SELECT` statements.
Bind values with `?` in `WITH SESSION`, `SET SESSION`, and `CALL`.
```sql
WITH SESSION query_max_execution_time = '10m'
SELECT 1;
```
Use `GROUP BY AUTO` to group by non-aggregated `SELECT` columns; it supports aggregations
nested in other expressions. Use `CORRESPONDING` to align set-operation columns by name.
`NEAREST` joins by approximate matches; `PIVOT` turns distinct row values into output columns.
### JSON and intervals
`JSON(...)` constructs native JSON from text, `json_scalar()` constructs it from a SQL scalar,
and `JSON_SERIALIZE` serializes it. `JSON_EXISTS`, `JSON_VALUE`, `JSON_QUERY`, and `JSON_TABLE` accept native `json` input.
JSON columns support dotted access, subscripts, scalar accessors, and `j.*` for a JSON array
of top-level members. `json_parse()` and JSON literals preserve object member order and duplicate keys.
```sql
SELECT JSON_VALUE(JSON('{"price":12.30}'), 'lax $.price' RETURNING decimal(4,2));
SELECT JSON_SERIALIZE(JSON('[1,2]') RETURNING varchar);
```
Interval types support leading-field precision and up to 12 fractional-second digits.
Extraction requires a field in the qualifier and returns the full leading field.
```sql
SELECT INTERVAL '1 02:03:04.123456789012' DAY(3) TO SECOND(12);
```
### Types, predicates, and views
- Use `number` for numeric values beyond `decimal` precision; Python UDFs can use it.
- Use `MATCH`, `UNIQUE`, `BETWEEN SYMMETRIC`, Boolean truth tests, and predicates in simple `CASE`.
- `AT LOCAL` converts a zoned datetime to the session time zone; `OVERLAPS` tests time periods.
- `CREATE VIEW IF NOT EXISTS` supports idempotent creation; `ALTER VIEW ... REFRESH` refreshes stored metadata.
- Add `EXCLUDE` to window frames to remove rows from the frame used by the window function.
## Iceberg and Lakehouse quick reference
Create a Lakehouse catalog with `connector.name=lakehouse`. Run format-appropriate maintenance
through Lakehouse, including `system.sync_partition_metadata`, `system.vacuum`, `optimize`, and `expire_snapshots`.
Iceberg v3 supports writes, deletes, column defaults, row lineage, `optimize`, `expire_snapshots`, and `remove_orphan_files`.
Iceberg v3 `variant` support is experimental; v3 also supports nanosecond timestamps, `geometry`, and `geography` columns.
- Use `$entries` and `$all_entries` for current-snapshot and cross-snapshot manifest entries.
- Use `optimize_manifests` to rewrite manifests. `optimize(sorted_by => ARRAY['event_time'])`
sets the sort order used when rewriting Iceberg files in Iceberg and Lakehouse.
- Set `gc_enabled=false` to prevent snapshot expiration, orphan removal, and `DROP TABLE` from deleting files.
- Pass `metadata_location` to `register_table` for metadata outside the default metadata directory.
- Iceberg supports metadata tables for materialized views, comments on them, and table procedures on them.
## Operations and client quick reference
- Set `query.max-output-data-size=1GB` to cap query output; `query.max-write-physical-size` or
session `query_max_write_physical_size` limits physical writes.
- `optimizer.max-reordered-joins` and `max_reordered_joins` accept at most `62`.
- With `retry-policy=TASK`, loss of spooled exchange data fails the query after a single task retry.
- Use `{user}` in file-based access-control `catalog`, `schema`, or `table` patterns.
- Forward selected extra credentials to OPA with `opa.identity.extra-credentials-keys`.
- JDBC OAuth client credentials use `oauth2ClientId`, `oauth2ClientSecret`, `oauth2TokenEndpoint`,
and `oauth2Scope`; CLI equivalents are `--oauth2-client-id`, `--oauth2-client-secret`,
`--oauth2-token-endpoint`, and `--oauth2-scope`.
- JDBC `ResultSet.getTime()` and `getTimestamp()` throw `SQLException` for incompatible column types.
- The redesigned Web UI is at `/ui`; enable `web-ui.legacy.enabled=true` for `/ui/legacy`.
The legacy UI is disabled by default. Use CLI `--theme` to select colorized output.