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

feat(python)!: Improve consistency of parsing expression input #9512

Merged
merged 7 commits into from Aug 17, 2023

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Jun 23, 2023

!! BREAKING !!

These are some improvements aimed at better handling inputs for select/with_columns and other methods that take expression inputs. These have already been deprecated - this is the PR that actually changes the behaviour.

Changes:

  • Passing None as the first input is now parsed as lit(None) rather than be ignored.
  • Passing an iterable (e.g. select(["a", "b"])) is still supported, but can no longer be combined with other positional parameters. If multiple positional parameters are supplied, the first argument is always assumed to be an expression input, rather than a list of expression inputs.
  • Methods that accept named expression inputs (select, with_columns, agg, struct) no longer have a separate argument for the first expression input. This means that select(exprs="a") now renames the column "a" to "exprs".

@stinodego stinodego changed the title fix(python)!: Improve consistency of parsing expression input feat(python)!: Improve consistency of parsing expression input Jun 23, 2023
@github-actions github-actions bot added breaking Change that breaks backwards compatibility fix Bug fix python Related to Python Polars enhancement New feature or an improvement of an existing feature labels Jun 23, 2023
@stinodego stinodego removed the fix Bug fix label Jun 23, 2023
@stinodego stinodego marked this pull request as ready for review June 23, 2023 07:11
@stinodego stinodego added this to the Python Polars 0.19.0 milestone Aug 16, 2023
@stinodego stinodego merged commit 5b4a42a into main Aug 17, 2023
12 checks passed
@stinodego stinodego deleted the breaking-expr-parsing branch August 17, 2023 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Change that breaks backwards compatibility enhancement New feature or an improvement of an existing feature python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant