Skip to content

Fix SqlToS3Operator failing for every format when df_type is polars - #74692

Merged
shahar1 merged 2 commits into
apache:mainfrom
Dev-iL:2610/amazon-polars
Oct 18, 2026
Merged

shahar1 merged 2 commits into
apache:mainfrom
Dev-iL:2610/amazon-polars

Conversation

@Dev-iL

@Dev-iL Dev-iL commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

related: #74555

The operator always called the pandas writers to_csv, to_json and to_parquet, which polars DataFrames do not have, so every df_type="polars" run failed with an AttributeError regardless of file format.

Previous tests did not catch it because their polars cases fed a pandas DataFrame to the operator.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Opus 5.5 following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@boring-cyborg boring-cyborg Bot added area:providers provider:amazon AWS/Amazon - related issues labels Oct 14, 2026
@Dev-iL
Dev-iL force-pushed the 2610/amazon-polars branch from bdf79a0 to 81c0ec3 Compare October 15, 2026 22:09
@Dev-iL
Dev-iL marked this pull request as ready for review October 18, 2026 09:10
@Dev-iL
Dev-iL requested a review from o-nikolas as a code owner October 18, 2026 09:10
Dev-iL and others added 2 commits October 18, 2026 12:11
The operator always called the pandas writers to_csv, to_json and to_parquet, which polars DataFrames do not have, so every df_type="polars" run failed with an AttributeError regardless of file format. The tests did not catch it because their polars cases fed a pandas DataFrame to the operator.
The polars upload round-trip test only wrote non-null strings, so nulls in
the CSV, JSON and Parquet output were never read back. The upload callback
has to read the buffer while the upload runs: the text wrapper around it
closes the buffer once execute returns, so a later read fails.

Co-authored-by: David Blain <info@dabla.be>
@Dev-iL
Dev-iL force-pushed the 2610/amazon-polars branch from 81c0ec3 to 3e4b192 Compare October 18, 2026 09:11
@shahar1
shahar1 merged commit 099c03e into apache:main Oct 18, 2026
84 checks passed
@Dev-iL
Dev-iL deleted the 2610/amazon-polars branch October 18, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants