Replies: 4 comments 3 replies
|
@mbasmanova @Yuhta @PingLiuPing would look to hear feedback from u guys |
|
@jja725 Could you say more about the real motivation? As written the design reads as theoretical rather than driven by a workload in production — which databases actually need to be queried, in what deployment, and what volumes of data are being fetched? The volume question matters most: a non-splittable, synchronous connection is a single stream pulled by one driver thread, so I'd like to understand whether the data sizes you have in mind are feasible on it at all, and what throughput looks like against a real database. Second, if the motivation is Prestissimo, why does this need to live in Velox? Prestissimo already hosts its own connectors — |
|
Thanks @mbasmanova , these are fair questions. There is a concrete production motivation: we’re migrating production workloads using the Presto MySQL connector to Velox/Prestissimo. |
Uh oh!
There was an error while loading. Please reload this page.
Hi all — I'd like to gather community feedback on adding a generic ADBC connector to Velox, so applications embedding Velox can scan relational databases (MySQL, PostgreSQL, SQLite, Snowflake, Flight SQL, ...) natively. An initial read-only implementation is up in #18258, with design notes in
docs/designs/adbc-connector.mdon that branch. There is also a companion Presto RFC proposing to use it from Prestissimo C++ workers (prestodb/rfcs#64), as a complement to the Java connector federation approach (RFC-0018).Why ADBC
Arrow ADBC is a vendor-neutral C API for database access whose drivers return results as an Arrow
ArrowArrayStream. Since Velox already has an Arrow C-ABI bridge, the whole data path — database wire protocol → Arrow (inside the driver) → Velox vectors (importFromArrowAsOwner, buffers adopted without copying) — runs in-process with a single format conversion. One connector serves every database; per-database behavior lives in the driver and in configuration, similar to how JDBC-based connectors work on the Java side.Design summary (as implemented in #18258)
.cc+ two headers, no third-party deps at the vendoredapache-arrow-adbc-14tag) is vendored intovelox/external/adbc, following thevelox/externalpattern. Drivers are shared libraries loaded at runtime; embedders that link a driver statically can pass anAdbcDriverInitFuncinstead.adbc.driverselects the driver; anyadbc.option.<name>key passes through toAdbcDatabaseSetOption(adbc.option.uri,adbc.option.username, ...), so new drivers need no Velox changes.adbc.identifier-quotecontrols quoting in generated SQL (backtick for MySQL).AdbcTableHandlenames either a table — the connector generatesSELECT <projected columns> FROM <table>(projection pushdown) — or a raw SQL query executed verbatim, which lets host engines do their own SQL generation/pushdown and hand Velox the final text.VELOX_ENABLE_ADBC_CONNECTOR(default OFF). Tests use a hermetic in-process fake driver (serves Velox vectors exported through the Arrow bridge, records the SQL it receives) — no database or driver library needed in CI.Open questions where input would help
velox/externalacceptable, or wouldresolve_dependencyonarrow-adbcbe preferred (at the cost of a new third-party dependency and the toml++ transitive dep in newer releases)?SubfieldFilters→ SQL translation (dialect-aware), or is engine-side SQL generation the right long-term boundary??placeholders plus bound constants. Supporting this natively maps toAdbcStatementBind(parameters as an Arrow batch). Worth adding to the connector API, or should engines inline literals?MemoryPool(like otherimportFromArrowAsOwnerusers). Is per-scan accounting of driver buffers something we should design for now?AdbcStatementBindalso enablesINSERTvia aDataSink. Any appetite / use cases?Would love feedback on the overall direction as well as the specific questions. If the direction looks good I'll iterate on #18258 accordingly.
All reactions