Skip to content

Fix datafusion import breaking provider yaml validation#63395

Closed
potiuk wants to merge 1 commit intoapache:mainfrom
potiuk:fix-datafusion-import-guard
Closed

Fix datafusion import breaking provider yaml validation#63395
potiuk wants to merge 1 commit intoapache:mainfrom
potiuk:fix-datafusion-import-guard

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Mar 11, 2026

The object_storage_provider.py in the common.sql provider has top-level imports from datafusion.object_store which is not a required dependency. This breaks the Validate provider.yaml files CI check because the module fails to import when datafusion is not installed.

Move the from datafusion.object_store import AmazonS3 and from datafusion.object_store import LocalFileSystem imports inside their respective create_object_store() methods where they are actually used, following the lazy-import pattern already used elsewhere in the codebase.


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

Generated-by: Claude Code (Claude Opus 4.6) following the guidelines

The top-level ``from datafusion.object_store import ...`` in
object_storage_provider.py caused provider.yaml validation to fail
when the datafusion package was not installed, since importing the
analytics operator module transitively triggered this import.

Move the imports into the methods that use them so the module can
be imported without datafusion installed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gopidesupavan
Copy link
Member

yeah good to move this but not sure that does fix the issue, because there is session context imported in the DataFusionEngine class ..
so we likely move Engine import complete to inside property field . https://github.com/apache/airflow/pull/63393/changes

@potiuk
Copy link
Member Author

potiuk commented Mar 11, 2026

yeah good to move this but not sure that does fix the issue, because there is session context imported in the DataFusionEngine class .. so we likely move Engine import complete to inside property field . https://github.com/apache/airflow/pull/63393/changes

Let's see :)

@potiuk
Copy link
Member Author

potiuk commented Mar 11, 2026

Yeah. not helping .. @gopidesupavan - yours is better :)

@potiuk potiuk closed this Mar 11, 2026
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.

4 participants