Skip to content

Add RFC for native ADBC connector in C++ workers - #64

Draft
jja725 wants to merge 1 commit into
prestodb:mainfrom
jja725:adbc-native-connector-rfc
Draft

Add RFC for native ADBC connector in C++ workers#64
jja725 wants to merge 1 commit into
prestodb:mainfrom
jja725:adbc-native-connector-rfc

Conversation

@jja725

@jja725 jja725 commented Jul 24, 2026

Copy link
Copy Markdown

Proposes a native ADBC connector for C++ workers: scan relational databases (MySQL, PostgreSQL, and other systems with ADBC drivers) directly in the worker process via Arrow ADBC, building on the generic ADBC connector added to Velox in facebookincubator/velox#18258.

The design is a point-for-point mapping of the existing presto-base-jdbc flow: the coordinator reuses JdbcClient metadata, dialect rules, TupleDomain pushdown, and JdbcComputePushdown unchanged, and renders the pushed-down predicate (with ? placeholders and bound constants, exactly as QueryBuilder does today) at split-generation time. The C++ worker composes the final SQL from the split's predicate and the scan's column handles, executes it through an in-process ADBC driver, and imports the Arrow result stream into Velox vectors zero-copy. Because base-jdbc layouts report the constraint as unenforced, any predicate the ADBC path does not push stays correct — the engine re-applies it — which allows a safely phased rollout (inlined-literal subset first, AdbcStatementBind parameter binding for full parity later).

This is a complement to RFC-0018 (Java connector federation), which addresses the same problem class through a Java Flight server. The RFC includes a detailed tradeoff comparison: federation can forward splits from any Java connector (RFC-0018 scopes its goals to single-node systems, but the split-forwarding mechanism is general) at the cost of a new service, a JVM in the data path, and a second network hop; the ADBC path covers the subset of systems with ADBC drivers and removes all three, at the cost of distributing credentials to workers and direct worker→database connection fan-out. The recommended posture is to adopt both, choosing per catalog.

Numbered RFC-0026 since 0024 and 0025 are claimed by open PRs (#59, #62, #63, #61).

@jja725
jja725 force-pushed the adbc-native-connector-rfc branch from 4da9cc1 to 9c90438 Compare July 24, 2026 08:02
@jja725
jja725 force-pushed the adbc-native-connector-rfc branch from 9c90438 to 45a3c6d Compare July 24, 2026 08:14
@jja725
jja725 marked this pull request as draft July 24, 2026 08:17
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.

1 participant