-
Notifications
You must be signed in to change notification settings - Fork 168
Open
1 / 51 of 5 issues completedLabels
Description
We're currently using the compliant classes to share some code between implementations
This is fine, but for protocols with other 3rd party backends should implement, I don't think this is ok:
- it will make it harder for us to change some internals
- it forces them to implement methods like
_evaluate_exprwhich they really shouldn't need to care about
I'd like to suggest therefore that we aim to have:
CompliantDataFrame,CompliantLazyFrame,CompliantSeries,CompliantExpr,CompliantNamespace: these should beProtocols which only implement the necessary functionality which we call fromnarwhals.DataFrame/ ...- we can subclass these to preserve some common functionality within Narwhals. For example,
DuckDBExpr/SparkLikeExpr/ ... all inherit fromLazyExpr, which in turn inherits fromCompliantExpr. It's fine to have some implementations inLazyExpr
PRs
- refactor: Move/remove private
Compliant*Framemethods #2934 - refactor(typing): Remove
CompliantDataFrame.collect#3041 - refactor: Organizing
Compliant*APIs #3045 - refactor: Split up
BaseFrame._extract_compliant#3054 - feat: Raise on mismatched
*Framejoins #3055 - refactor: Add
CompliantFrameprotocol #3056 - refactor: Move
CompliantExpr._eval_names_indices#3062 - chore: Add
CompliantFrame._with_native#3140
dangotbanned and EdAbati