Skip to content

feat(plugins): connect to Presto through the Trino plugin - #3712

Merged
datlechin merged 9 commits into
mainfrom
feat/3598-presto-connections
Oct 20, 2026
Merged

datlechin merged 9 commits into
mainfrom
feat/3598-presto-connections

Conversation

@datlechin

@datlechin datlechin commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Presto is a connection type of its own, served by the Trino plugin as a variant (additionalDatabaseTypeIds), with its own icon, a presto:// scheme and jdbc:presto:// import.
  • The Presto client sends X-Presto-* headers and no client capabilities header, which Presto does not define.
  • Presto connects on SELECT 1 and reads its version from system.runtime.nodes: it has no version().
  • Presto lists materialized views from information_schema.materialized_views and skips the table comment query: it has neither system.metadata table.
  • Presto browses its leading rows with LIMIT and no page navigation: OFFSET is off by default, and the grammar takes neither FETCH NEXT nor LIMIT before OFFSET. A variant now keeps its curated pagination over its plugin's grammar, as it already does for case sensitivity.
  • Presto offers no COMMENT ON edits, which its grammar lacks.
  • Arrays, maps and rows that Presto sends as JSON text read as JSON. KHyperLogLog and kllsketch read as binary.
  • An installed plugin that predates a variant no longer serves it: a Presto connection on a Trino plugin without Presto asks for the plugin update instead of sending Trino headers.
  • A Trino or Presto URL path reads as /catalog/schema on import and is written back that way on copy.
  • Errors and the server version name the right engine.
  • An iPhone import of a Mac export marks a Presto connection Mac only instead of unsupported.
  • The Trino curated entry moved to PluginMetadataRegistry+TrinoDefaults.swift, next to Presto's.
  • apple/scripts/probes/check-presto-protocol.sh checks each Presto fact above against a stock coordinator.
  • Updated on purpose: PluginMetadataRegistryTypeCountTests and SQLLexicalReadingsTests list Presto, CellExpressionVocabularyTests expects no UPDATE ... DEFAULT on Presto, SQLDDLFallbackPolicyTests classifies Presto as an engine with SQL DDL, MacOnlyImportRowTests covers Presto.

Test plan

  • New TableProTrinoCoreTests: Presto headers, no capabilities header, Presto response headers, introspection SQL, connect and version statements, structured values sent as text, sketch types.
  • PluginMetadataRegistryVariantTests: Presto keeps LIMIT paging when the Trino plugin registers it, and a Presto browse writes no OFFSET or FETCH. PluginManagerVariantAccessorTests: a Trino plugin without Presto does not serve a Presto connection. ConnectionURLParserJDBCTests and ConnectionURLFormatterTests: presto://, jdbc:presto:// and /catalog/schema paths.
  • The probe against prestodb/presto:latest (0.299): every check passes, including connect, catalogs, schemas, tables, a LIMIT browse, the EXPLAIN variants and Cancel Query (DELETE on nextUri leaves the query FAILED).

Fixes #3598

@datlechin
datlechin merged commit 3ea26b3 into main Oct 20, 2026
8 of 9 checks passed
@datlechin
datlechin deleted the feat/3598-presto-connections branch October 21, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connect to Presto through the Trino plugin

1 participant