More patterns · Open reference architecture
Arrow-native serving
Arrow Flight SQL and Spark Connect clients over lakehouse tables
Results leave as Arrow columns, not rows, in whatever language the client speaks.
In one paragraph
Arrow-native serving delivers lakehouse query results as Apache Arrow record batches over gRPC instead of row-by-row JDBC. Two open protocols do this: Arrow Flight SQL, a generic SQL-over-Flight protocol, and Spark Connect, Spark's client-server protocol. A Flight SQL server built on Apache DataFusion can answer queries over Delta tables with policy enforcement and lineage built in, while Spark Connect lets thin clients in Python, Go, Rust, Swift and other languages send plans to a remote Spark and hand the Arrow results straight to DuckDB or Polars.
More patterns
Arrow Flight SQL and Spark Connect clients over lakehouse tables
Sources
Ingestion
Open lakehouse platform
Engine access
How agents, apps and people reach compute: a client session per identity.
Execution
Spark's execution modes, plus engines that read the same tables.
Data foundation
Open tables in a governed catalog, on storage you own.
Serving
Teams
When to use it
- Clients pull large result sets into Python, Rust or other analytical tools.
- You want to query the lakehouse from a language without a JVM.
- You want policy and lineage enforced at the serving edge.
When to pick something else
- Clients that only speak ODBC or JDBC: put a Flight SQL JDBC driver or a SQL gateway in front.
Walkthrough
How data moves through it
- 1
Client sends a query or plan
A Flight SQL client sends SQL, or a Spark Connect client sends an unresolved logical plan over gRPC.
- 2
Server resolves tables
The server resolves table names through the catalog and obtains storage access.
- 3
Policy applies
In hydrofoil, Cedar policies are enforced inside the DataFusion plan before execution.
- 4
Arrow streams back
Results stream to the client as Arrow record batches.
- 5
Zero-copy downstream
The client hands the same Arrow batches to DuckDB or Polars without conversion.
Bill of materials
Components and versions
| Capability | Component | Role in this architecture | Version | License |
|---|---|---|---|---|
| Engine accessSpark Connect sessions | Spark Connect | gRPC protocol for Spark clients | Apache-2.0 | |
| Engine accessSpark Connect sessions | Spark Connect clients | Python, Scala, Go, Rust, OCaml, Swift clients | ||
| ExecutionBatch and SQL | Apache Spark | Remote engine behind Spark Connect | 4.2.0 in the demos | Apache-2.0 |
| ExecutionOther engines | Apache DataFusion | Query engine inside the Flight SQL server | 55 | Apache-2.0 |
| ExecutionOther engines | DuckDBor Polars | Joins Arrow results locally | MIT | |
| Data foundationCatalog and credentials | Unity Catalog OSSor unitycatalog-rs | Resolves tables and vends credentials | Apache-2.0 | |
| Data foundationOpen table format | Delta Lakeor Apache Iceberg | Tables served | Apache-2.0 | |
| GovernanceAccess control and policy | breakwater | Cedar enforcement in the DataFusion planner | Apache-2.0 | |
| GovernanceLineage | OpenLineage | Lineage emitted per query | Apache-2.0 | |
| ServingApps and APIs | hydrofoil | Flight SQL server with Cedar policy and OpenLineage | ||
| ServingApps and APIs | Arrow Flight SQL | Protocol | Apache-2.0 |
People and agents
Who works with it
Data engineers
Pipelines that are correct, idempotent and cheap to rerun.
Works with: Batch and SQL, Open table format
AI agents
Tools with clear arguments, a sandbox to write into, fast feedback from dry runs, and version-pinned context.
Works with: Spark Connect sessions
Analysts and analytics engineers
One definition of each metric, fast SQL, and dashboards that match.
Works with: Other engines, Batch and SQL
Platform engineers
A platform that is boring to run: deployable from code, observable, with identities for every person, service and agent.
Works with: Catalog and credentials, Spark Connect sessions
Governance and security
Policies that hold in every engine and for every agent, lineage for audits, and least privilege by default.
Works with: Access control and policy, Lineage, Catalog and credentials
Run it
Reference code
A Flight SQL server over open-table-format tables, built on DataFusion 55 with Cedar policy enforcement, OpenLineage and OpenTelemetry tracing.
Demos 02 (Spark Connect setup), 08 (OCaml client) and 09 (Rust client with DuckDB 2.0 and Polars on the same Arrow batches).
Caveats from the reference repos
- hydrofoil's README does not yet document running the Flight SQL server; its architecture is recorded in docs/adr.
Answers
Frequently asked questions
- What is the difference between Arrow Flight SQL and Spark Connect?
- Both stream Apache Arrow over gRPC. Flight SQL is a generic SQL protocol any engine can implement; Spark Connect carries Spark's own logical plans, so clients get the full DataFrame API of a remote Spark.
- Can I use Spark from Rust or Go?
- Yes, through Spark Connect clients. spark-demos demo 09 uses the Rust client and passes the Arrow results to DuckDB and Polars.
Related architectures
All architecturesMore patterns
Policy pushdown and open lineage
Cedar policies compiled to CEL, enforced in Spark and DataFusion, with OpenLineage
Platform
The agentic lakehouse
Omnigent and MLflow over sandboxed Spark Connect sessions, on Iceberg and Unity Catalog
Platform
The open lakehouse on a laptop
Spark 4.3, Apache Iceberg, Unity Catalog, Kafka, Airflow, MLflow and an agent, in Docker
