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

[FEA] Refactor Column/NamedColumn split in cudf-polars #16272

Open
wence- opened this issue Jul 12, 2024 · 0 comments
Open

[FEA] Refactor Column/NamedColumn split in cudf-polars #16272

wence- opened this issue Jul 12, 2024 · 0 comments
Assignees
Labels
0 - Backlog In queue waiting for assignment cudf.polars Issues specific to cudf.polars feature request New feature or request

Comments

@wence-
Copy link
Contributor

wence- commented Jul 12, 2024

Currently NamedColumn inherits from Column, however, because the constructor of the former takes an additional (required) argument, parent class factory methods that return Self cannot be used for the child class.

This is painful because it means that we must replicate the code: one can't even do super().bla because if that constructs a Self it will have a name missing.

Really, named columns only appears when constructing dataframes: when evaluating expressions, the column can safely drop the name.

In the expression evaluator, the only place a namedcolumn appears is when evaluating a Col expression (which pulls a column out of a dataframe). But at that point, we could drop the name.

This suggests that we shouldn't have that a NamedColumn is-a Column, but rather a NamedColumn has-a Column (and a name).

@wence- wence- added feature request New feature or request 0 - Backlog In queue waiting for assignment cudf.polars Issues specific to cudf.polars labels Jul 12, 2024
@wence- wence- self-assigned this Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Backlog In queue waiting for assignment cudf.polars Issues specific to cudf.polars feature request New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

1 participant