Skip to content

Support abfs:// and abfss:// URIs in DataFusion Azure Blob Storage - #74228

Merged
kaxil merged 7 commits into
apache:mainfrom
pankajastro:afl-313-support-abfs-and-abfss-uris-in-datafusion-azure-blob-storage
Oct 14, 2026
Merged

kaxil merged 7 commits into
apache:mainfrom
pankajastro:afl-313-support-abfs-and-abfss-uris-in-datafusion-azure-blob-storage

Conversation

@pankajastro

Copy link
Copy Markdown
Member

Extends the DataFusion object storage layer's Azure support (#73374, az:// only) to also
accept abfs:// and abfss:// URIs. When the URI's embedded storage account disagrees with
the one the wasb connection resolves to, registering the datasource raises instead of
silently picking one.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Sonnet 4.5)

Generated-by: Claude Code (Sonnet 4.5) following the guidelines

@pankajastro
pankajastro marked this pull request as ready for review October 5, 2026 16:05
@pankajastro
pankajastro force-pushed the afl-313-support-abfs-and-abfss-uris-in-datafusion-azure-blob-storage branch from e33a312 to 11a1436 Compare October 5, 2026 16:05
@pankajastro
pankajastro requested review from Lee-W and kaxil October 5, 2026 16:07
@pankajastro
pankajastro force-pushed the afl-313-support-abfs-and-abfss-uris-in-datafusion-azure-blob-storage branch from 11a1436 to 279a3ed Compare October 6, 2026 06:19
@pankajastro
pankajastro force-pushed the afl-313-support-abfs-and-abfss-uris-in-datafusion-azure-blob-storage branch 3 times, most recently from 3e0ca9e to 2ffa8a5 Compare October 9, 2026 08:45
Comment thread providers/common/sql/docs/operators.rst Resolved
pankajastro and others added 6 commits October 14, 2026 10:57
PR apache#73374 added az:// support to the DataFusion object storage layer
but deliberately deferred abfs:// and abfss://, since they embed the
storage account in the URI itself ([email protected]/path)
rather than relying solely on the wasb connection, raising an open
question of which account should win on disagreement.

Datasources can now use either scheme. When the URI names an account
that disagrees with the one the wasb connection resolves to,
registering the datasource raises instead of silently picking one.

Co-Authored-By: Claude <[email protected]>
Sphinx's spellchecker flattens unquoted docstring prose to plain text,
so the bare az:// and abfs(s):// in two docstrings were flagged as
misspelled words. Wrapping them in double backticks, the convention
already used elsewhere in this file, excludes them as RST literals.

Co-Authored-By: Claude <[email protected]>
DataFusion's object-store registry keys on (schema, host); omitting
host only matches an empty-authority URI like file:///path. Every
bucket/container-style scheme (s3://, gs://, az://, and now
abfs(s)://) therefore failed at query time with "No suitable object
store found", a pre-existing gap in the original az:// support
invisible to the test suite because it mocks SessionContext rather
than exercising DataFusion's real registry. Found by manually testing
abfs:// against a real storage account.

Co-Authored-By: Claude <[email protected]>
…tation

Addresses review feedback: the abfs(s) object-store registry key collided
for two containers on the same storage account, an explicit
storage_type=StorageType.LOCAL with a bare path regressed when get_scheme
was generalized to take a URI, and a connection resolving no account
silently fell back to AZURE_STORAGE_ACCOUNT_NAME instead of the account
named in the URI.

Fixing the first of those by folding the container alone into the
registry's host key turned out to trade one collision for another -- two
different accounts sharing a container name would then collide instead.
Folding both account and container into the host key avoids both.

Also stopped register_datasource from mutating the caller's
DataSourceConfig.uri in place: reusing the same config across a second
engine fed the already-normalized URI back through get_bucket, which
misread the account+container host token as the container name. The
canonical URI is now threaded through locally instead.

Co-Authored-By: Claude <[email protected]>
An abfs(s) URI on a non-public cloud host was silently sent to the public
cloud because the binding has no endpoint override, and a service-principal
connection without a host took the client ID as the storage account name.
Reviewers also asked for clearer docs and a stronger test.

Existing ObjectStorageProvider subclasses that define a zero-argument
get_scheme() keep working so the provider base class stays compatible.

Co-Authored-By: Claude <[email protected]>
normalize_uri already rewrites abfs(s) URIs onto az://, so the engine only
needs the provider's single scheme. This drops the inspect.signature shim and
keeps the get_scheme contract released in 2.3.0. Also pins the public-cloud
URI host check with the endpoint env vars cleared, including a mixed-case host.
@pankajastro
pankajastro force-pushed the afl-313-support-abfs-and-abfss-uris-in-datafusion-azure-blob-storage branch from 2043604 to 5bdfd16 Compare October 14, 2026 05:27
@kaxil
kaxil merged commit 275aa69 into apache:main Oct 14, 2026
108 checks passed
@pankajastro
pankajastro deleted the afl-313-support-abfs-and-abfss-uris-in-datafusion-azure-blob-storage branch October 14, 2026 07:53
@shahar1 shahar1 linked an issue Nov 6, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add GCS, Azure Support for AnalyticsOperator

2 participants