Skip to content
Back to skills

Trino Knowledge Patch

ASecurity

Trino

  • 25 stars
  • 0 votes
  • 0 copies
  • 10 views
  • Added September 5, 2026
developmentgojavasqlnodeexpressdockerazuregitapidatabase

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill trino-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Trino Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Trino Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-trino-knowledge-patch-nevaberry-plugins/badge)](https://www.skillsdirectory.com/skills/nevaberry-trino-knowledge-patch-nevaberry-plugins)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: trino-knowledge-patch
description: Trino
version: "484"
license: MIT
metadata:
  author: Nevaberry
---


# Trino compatibility guidance

Load this skill when upgrading Trino, changing SQL or catalog configuration,
investigating query correctness, configuring clients, or adapting connector plugins.
Use the topic references for complete guidance, examples, and version-specific behavior.

## Reference index

| Reference | Topics |
| --- | --- |
| [Upgrading and correctness](references/upgrading-and-correctness.md) | Release hazards, runtime and packaging, removals, query correctness, memory and planning failures |
| [Clients and drivers](references/clients-and-drivers.md) | JDBC connections, authentication, result types, spooling, CLI |
| [Connectors and integrations](references/connectors-and-integrations.md) | Database connectors, Faker, Memory, external services, TPC-DS |
| [Lakehouse and object storage](references/lakehouse-and-object-storage.md) | Delta Lake, Hive, Hudi, Iceberg, Lakehouse, catalogs, storage, caching, maintenance |
| [Server operations, security, and observability](references/server-operations-security-observability.md) | Deployment, resource groups, exchanges, access control, events, metrics, UI |
| [SPI and plugin development](references/spi-and-plugin-development.md) | Connector lifecycle, metadata, pages, blocks, types, memory, pushdown, plugin migrations |
| [SQL language and functions](references/sql-language-and-functions.md) | Queries, DDL, predicates, JSON, intervals, geometry, UDFs, coercion |

## Upgrade hazards and requirements

Review release-note ⚠️ markers for configuration removals or renames, changed defaults,
external system requirements, incompatible SPI changes, and deployment changes.

- 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 has a
  memory-tracking bug that can cause spurious `EXCEEDED_LOCAL_MEMORY_LIMIT` failures;
  release 475 fixes the memory accounting error.
- Use JDK 25 to build Trino and run the server. JDBC and CLI require Java 11 or later.
- The Docker image switches to a hardened core runtime without `grep`, `dnf`, or
  `useradd`; the `ppc64le` image and `run-trino` are removed. In custom
  `node.properties`, set `node.id=${ENV:HOSTNAME}` to derive the node ID from the hostname.
- The server RPM was removed. Use the server tarball or container image, or build an
  RPM using [trino-packages](https://github.com/trinodb/trino-packages).
- Deploy each catalog on every node. Deploy the HTTP server event listener plugin
  separately when used; the server distribution and Docker image omit it.
- Kinesis, Kudu, Phoenix, and Vertica connectors were removed. The server tarball and
  Docker image also dropped the example HTTP connector.
- ClickHouse requires ClickHouse 24.3 or later, or Altinity 22.3 or later;
  PostgreSQL requires PostgreSQL 12 or later; Cassandra requires Cassandra 4.0 or later.
- BigQuery and Snowflake require `--sun-misc-unsafe-memory-access=allow` in server JVM
  configuration. Ignite requires `--add-opens=java.base/java.util=ALL-UNNAMED`.

## Configuration migrations

| Scope | Migration |
| --- | --- |
| Server HTTP clients | Replace `workerInfo` and `memoryManager` prefixes with `worker-info` and `memory-manager`. |
| Hash generation | Remove `optimizer.optimize-hash-generation` and the `optimize_hash_generation` session property. |
| Task statistics | Remove `task.statistics-cpu-timer-enabled`. |
| Session settings | Remove `prefer_streaming_operators`. |
| Dynamic filtering | Remove `enable-large-dynamic-filters`, `dynamic-filtering.small*`, `dynamic-filtering.large-broadcast*`, and session property `enable_large_dynamic_filters`. |
| OAuth groups | Remove `deprecated.http-server.authentication.oauth2.groups-field`. |
| Native object storage | Migrate Delta Lake, Hive, Iceberg, and Lakehouse to native file systems for Azure, GCS, IBM Cloud Object Storage, S3, and S3-compatible systems; `fs.hadoop.enabled` applies only to HDFS. |
| S3 timeouts | In Delta Lake, Hive, Hudi, and Iceberg, replace `s3.socket-read-timeout` with `s3.socket-timeout`. |
| Hive Glacier reads | Replace `hive.s3.storage-class-filter` with `hive.s3-glacier-filter`. |
| Cache scheduling | Replace catalog property `fs.cache.preferred-hosts-count` with coordinator property `node-scheduler.cache-preferred-hosts-count`. |
| Iceberg REST authentication | Replace `iceberg.rest-catalog.sigv4-enabled` with `iceberg.rest-catalog.security=SIGV4`. |
| Iceberg equality deletes | Remove `iceberg.equality-deletes-blocks-hash-enabled` from Iceberg and Lakehouse catalogs. |

For Hive, Delta Lake, Iceberg, and Lakehouse, configure the shared per-node cache using
`cache-manager.config-files` and enable `fs.cache.enabled` in the catalog. 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.
Migrate fault-tolerant exchanges off Alluxio-backed storage.

## SQL and data compatibility

- Mixed `char`/`varchar` expressions coerce `char` to `varchar`, trimming its trailing
  spaces; comparisons then use `varchar` semantics, where trailing spaces matter.
  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 when scalar string results need their quotes omitted.
- Quote identifiers named `"JSON_SERIALIZE"` and qualify user-defined functions named
  `json` to distinguish them from the JSON constructor.
- `GRANT`, `REVOKE`, `SET AUTHORIZATION`, and `CREATE SCHEMA` preserve user name case
  and compare it case-sensitively with the authenticated user. Match that spelling
  and use lowercase role names.
- `EXPLAIN (TYPE LOGICAL)` and `EXPLAIN (TYPE DISTRIBUTED)` are deprecated; use plain
  `EXPLAIN`.
- Hive and Lakehouse default `hive.storage-format` to `PARQUET`; set
  `hive.storage-format=ORC` to keep ORC as the default. New Delta Lake data files
  default to `ZSTD`, previously `SNAPPY`.
- `DROP TABLE` is disallowed for Delta Lake tables with UniForm enabled. Use a partition
  column type other than `varbinary` when creating a Delta Lake table.
- Iceberg `$files` exposes `lower_bounds` and `upper_bounds` as typed rows. Replace
  field-ID map lookups and map-to-JSON casts with named field access for individual bounds.
- MySQL and SingleStore no longer read `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.

## Plugin migration essentials

Replace `Slice` with `io.trino.json.Json` for native JSON values. Day-time intervals
use microseconds; recompile plugins for changed `StandardTypes.INTERVAL_DAY_TO_SECOND`
and `StandardTypes.INTERVAL_YEAR_TO_MONTH` values.

Update direct `BooleanType` block access and construction from `ByteArrayBlock` to
`BitArrayBlock`. Blocks use bit-packed validity bitmaps for nulls; use that representation
or the block builder API. `DictionaryBlock.compact()` and `compactRelatedBlocks()` return
`Block` and may return a simpler representation.

Report memory shared by page sources through the `MemoryContext` passed to
`ConnectorPageSourceProviderFactory.createPageSourceProvider()`.
`ConnectorPageSourceProvider.getMemoryUsage()` was removed;
`ConnectorPageSinkProvider.createMergeSink()` requires a `MemoryContext`.

`ConnectorMetadata.finishMerge()` must return `Optional<ConnectorOutputMetadata>`.
Use `TrinoPrincipal.getPrincipalName()` to preserve user name case; `getName()` is
deprecated. `TrinoPrincipal` and `RoleGrant` no longer support JSON serialization.
The SPI reference covers the remaining removals and signature changes.

## SQL quick reference

Use `WITH SESSION` before a `SELECT` to apply properties to that query; it 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 selected columns, including queries with
aggregations nested in other expressions. Use `CORRESPONDING` to align set-operation
columns by name, `NEAREST` for approximate join matches, and `PIVOT` to turn distinct
row values into output columns.

Pass a parenthesized query to `DESCRIBE OUTPUT` to inspect its result columns directly.
Use `CREATE VIEW IF NOT EXISTS` for idempotent view creation.

```sql
DESCRIBE OUTPUT (SELECT * FROM nation);
CREATE VIEW IF NOT EXISTS example_view AS SELECT 1 AS id;
```

Use `number` for values beyond `decimal` precision. Use `MATCH` to test a row against a
subquery, `UNIQUE` to test a subquery for duplicate rows, and `BETWEEN SYMMETRIC` to
accept bounds in either order. `EXCLUDE` removes rows from a window function's frame.

## JSON, intervals, and geometry

`JSON(...)` constructs native JSON from text; `json_scalar()` constructs it from a SQL
scalar; `JSON_SERIALIZE` serializes it. `JSON_EXISTS`, `JSON_VALUE`, `JSON_QUERY`, and
`JSON_TABLE` accept native `json` input. JSON columns support dotted access and subscripts.

```sql
SELECT JSON_VALUE(JSON('{"price":12.30}'), 'lax $.price' RETURNING decimal(4,2));
SELECT JSON_SERIALIZE(JSON('[1,2]') RETURNING varchar);
```

`json_parse()` and JSON literals preserve object member order and duplicate keys.
`JSON_OBJECT ... WITH UNIQUE KEYS` accepts `FORMAT JSON` arguments and checks nested
objects for duplicate keys. Arrays and objects can nest up to 1,024 levels.

Intervals accept explicit leading-field precision and up to 12 fractional-second digits.
Extraction requires a field in the qualifier and returns the full leading field.
`AT LOCAL` converts a zoned datetime to the session time zone. `AT TIME ZONE` on `time`
rejects interval offsets outside `-14:00` through `+14:00`.

Use `ST_Transform` and `ST_TransformXY` for coordinate reference system transformations.
The three- and four-argument `ST_Point` overloads construct 3D points; `ST_Z` reads Z,
and `ST_Force2D` or `ST_Force3D` changes dimensionality.

## Storage and table maintenance

Create a Lakehouse catalog with `connector.name=lakehouse`. Run format-appropriate
procedures such as `system.sync_partition_metadata`, `system.vacuum`, `optimize`, and
`expire_snapshots` through that catalog.

In Delta Lake, Hive, Hudi, Iceberg, and Lakehouse, select native S3 authentication with
`s3.auth-type`: use `IAM_ROLE` when `s3.iam-role` is configured, replace
`s3.use-web-identity-token-credentials-provider` with `s3.auth-type=WEB_IDENTITY`, and
use `s3.auth-type=ANONYMOUS` for public bucket reads.

For Iceberg REST catalogs with `iceberg.rest-catalog.vended-credentials-enabled=true`,
enable the warehouse's native file system, for example `fs.s3.enabled=true`. 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`.

Iceberg v3 supports creation, writes, deletes, column defaults, and row lineage, plus
`optimize`, `expire_snapshots`, and `remove_orphan_files`. Its `variant` support is
experimental. Reads and writes also support nanosecond timestamps and spatial columns.

Use the Iceberg `rollback_to_snapshot` table procedure; the catalog-level
`system.rollback_to_snapshot` procedure is deprecated. `optimize_manifests` rewrites
manifests. Set `gc_enabled=false` to prevent snapshot expiration, orphan file removal,
and `DROP TABLE` from deleting table files.

```sql
ALTER TABLE iceberg.analytics.events EXECUTE optimize_manifests;
ALTER TABLE iceberg.analytics.events EXECUTE optimize(sorted_by => ARRAY['event_time']);
```

## Clients and operational controls

For OAuth 2.0 client credentials, JDBC uses `oauth2ClientId`, `oauth2ClientSecret`,
`oauth2TokenEndpoint`, and `oauth2Scope`; CLI uses `--oauth2-client-id`,
`--oauth2-client-secret`, `--oauth2-token-endpoint`, and `--oauth2-scope`.
`externalAuthenticationTokenCache=SYSTEM` persists JDBC external authentication tokens
in `~/.trino/` for reuse across client processes.

Set `query.max-output-data-size=1GB` to cap query output data. Limit physical writes
with `query.max-write-physical-size` or session property `query_max_write_physical_size`.
`optimizer.max-reordered-joins` and `max_reordered_joins` accept at most `62`.
With `retry-policy=TASK`, losing spooled exchange data fails the query after one task retry.

The redesigned Web UI is at `/ui`. Enable `web-ui.legacy.enabled=true` for the previous
UI at `/ui/legacy`, which is disabled by default. Query controls support cancellation
or preemption, and the query list supports filtering by client tags and sorting by progress.

Files in this skill

  • SKILL.md9.2 KB
  • coverage.json1.5 KB
  • references/clients-and-drivers.md3.2 KB
  • references/connectors-and-integrations.md5.6 KB
  • references/lakehouse-and-object-storage.md13.1 KB
  • references/server-operations-security-observability.md6.5 KB
  • references/spi-and-plugin-development.md5.7 KB
  • references/sql-language-and-functions.md9.4 KB
  • references/upgrading-and-correctness.md11.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.