Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Polars GroupBy Issue #3348 #3349

Merged
merged 3 commits into from
Jan 6, 2025
Merged

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Fix Polars GroupBy Issue #3348

This PR fixes an issue where group by transformations in Polars were not correctly referencing the original column names in the generated code.

Changes

  • Modified the code generation in print_code.py to use pl.col() for group by columns
  • Added test case test_polars_groupby_alias to verify proper column name handling in group by transformations
  • Ensures both group by and aggregation operations reference original column names correctly

Testing

Added a new test that:

  • Creates a test DataFrame with "group" and "age" columns
  • Applies a group by transformation with max aggregation
  • Verifies the transformed DataFrame structure and values
  • Checks that the generated code correctly uses pl.col() for both group by and aggregation columns

Link to Devin run

https://app.devin.ai/sessions/ba11f083aa6b4f63857d6f1fbe11ac00

Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link

vercel bot commented Jan 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 6, 2025 2:50pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 6, 2025 2:50pm

Copy link
Contributor Author

Devin is currently unreachable - the session may have died.

@mscolnick mscolnick merged commit ce8cede into main Jan 6, 2025
32 of 33 checks passed
@mscolnick mscolnick deleted the devin/1736171196-groupby-polars-fix branch January 6, 2025 15:18
Copy link

github-actions bot commented Jan 6, 2025

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.10.10-dev20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant