Skip to content

Connect to Presto through the Trino plugin #3598

Closed

Description

@datlechin

Problem

The Trino plugin cannot connect to Presto. databases/trino.mdx says so under Limitations: Presto speaks the same client protocol under an X-Presto- header prefix, and the driver always sends X-Trino-.

Most of the protocol side is already there:

  • TrinoProtocolHeaders.presto exists (apple/Packages/TableProCore/Sources/TableProTrinoCore/TrinoProtocolHeaders.swift:11), and every request and response header is built from the chosen prefix.
  • TrinoClientConfig takes a protocolHeaders value with .trino as the default (TrinoClientConfig.swift:61).
  • makeClientConfig in apple/Plugins/TrinoDriverPlugin/TrinoPluginDriver.swift:197 never passes it, so every connection gets .trino. Nothing in the app refers to .presto.

#1906, which added Trino, left Presto for later because the protocol is close.

Proposed solution

  • A Presto connection type served by the Trino plugin, the way the PostgreSQL plugin serves Redshift and CockroachDB through additionalDatabaseTypeIds (apple/Plugins/PostgreSQLDriverPlugin/PostgreSQLPlugin.swift:44). It builds its client with .presto. A Server dropdown on the Trino form would also work, but a type of its own gives Presto its name in the New Connection picker and a presto:// URL scheme next to trino://.
  • Before shipping, check against a Presto coordinator what differs past the headers:
    • Browse paging. The plugin pages with OFFSET n ROWS FETCH NEXT m ROWS ONLY (apple/Plugins/TrinoDriverPlugin/TrinoPlugin.swift:142).
    • The introspection queries, in particular system.metadata.table_comments and system.metadata.materialized_views (TrinoIntrospectionSQL.swift:58 and :66).
    • The PARAMETRIC_DATETIME client capability every request sends (TrinoStatementClient.swift:325).
    • The type mapper and the EXPLAIN variants.
  • A Presto section in the docs in place of the Limitations line.

Done means: a stock Presto coordinator connects, lists catalogs, schemas and tables, runs a query, and cancels one with Cancel Query.

Alternatives considered

None inside TablePro. The Presto CLI or the coordinator's web UI.

Platform

macOS

Related database type

N/A / General

Activity

  1. added
    enhancement
    platform-macos
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplatform-macos

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions