You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
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 aSelf
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-aColumn
, but rather aNamedColumn
has-aColumn
(and a name).The text was updated successfully, but these errors were encountered: