Repository navigation
Conversation
Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughSelector unions now return selected series and names in dataframe column order. When both selectors select the same column, the right selector’s series is used. Tests check the expected ordering. ChangesSelector union ordering
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to Selector unions now return columns in dataframe order, and the regression test checks that behavior. No supported-input merge blocker remains. Security Architecture ReviewSecurity architecture risk: ⚪ Minimal · up to Selector unions now follow dataframe column order while preserving right-side precedence for overlapping selections. The inspected change introduces no material security risk or new privileged operation. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
CompliantSelector.__or__put the left selector's columns first, soncs.boolean() | ncs.numeric()came back as['d', 'a', 'c']on pandas, pyarrow and duckdb while Polars gives schema order. The union now filtersdf.columnsby the selected names.test_set_opsnow checks the exact order instead ofsorted(...), with a case where the left selector's column comes after the right one's.What type of PR is this? (check all applicable)
Related issues
Selector.__xor__andExpr.__xor__for symmetric difference #3621|) returns columns in a different order on non-Polars backends #4029AI assistance
Checklist
Code follows style guide (ruff)
Tests added
Documented the changes
If this is your first PR to narwhals, attach a screenshot of
pytestpassing locally (not CI):Summary by CodeRabbit