refactor!: method-form census - free functions move into their types - #425
Merged
Merged
Conversation
…methods of LogicalPlan, FrameOp and ScanSource
The column verbs the engine layers above read - row gather / slice, the validity-mask read, the mask-to-row-indices read, the two-column coalesce, backend convergence, reduction dispatch, sort-key building - move from free functions to Series methods, and the single-key comparator to a SortKey method. DataFrame::filter_row_indices follows the same move on the frame side. Method coherence puts them in series / frame where the types live; the callers in frame, internal/kernel and io switch from bare or qualified free-function calls to dot syntax, and the two using-import binding lists shrink to what is not a method.
numeric_cols, cols_of_dtype, cols_matching, cols_starts_with, cols_ends_with and cols_contains move from free functions (re-exported through the root facade) to DataFrame methods, so the frame appears once at the call site: df.select(df.numeric_cols()) instead of df.select(numeric_cols(df)). The free-function spellings and their facade re-exports are gone - a v0.7 break, documented in the migration guide.
The one-off private helpers whose first argument is the value they work on - the frame render/format helpers, the join key resolvers on JoinOptions, the series row-rebuild skeletons, ExprNode's leftmost-name walk, and the CmpVerb comparison primitives (apply_cmp included, which the census missed as a generic) - move from free functions to methods.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The free-function-to-method census lands: 49 functions whose first argument is a type defined in the same package (method coherence pins a method to its type's package) become methods, in four focused commits.
1434 tests green, coverage fully covered, all guards pass (version identity, stale names, enum/facade/engine-seam/internal surfaces, layering, comment references, array copy boundaries).