Skip to content

Fix DataFrame column clone behavior - #7754

Open
svick wants to merge 1 commit into
mainfrom
svick/fix-dataframe-clone-behavior
Open

svick wants to merge 1 commit into
mainfrom
svick/fix-dataframe-clone-behavior

Conversation

@svick

@svick svick commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Summary

  • append default values when VBufferDataFrameColumn clone overloads request appended entries
    • doing nothing (previous behavior) or throwing an exception for non-zero numberOfNullsToAppend seemed like worse options
  • allow enumerable index maps to produce more values than the source column
  • add regression coverage for both behaviors

Addresses the two findings from the review on #7750.

Validation

Manually ran a CI build. CI is skipped for this PR because it doesn't target main, because it's a stacked PR.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementations match the documented behavior and include focused regression coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Fixes cloning behavior for default-value appends and enumerable index maps.

Changes:

  • Appends default VBuffer<T> values during cloning.
  • Allows enumerable index maps longer than the source column.
  • Adds regression tests for both behaviors.
File Description
src/​Microsoft.Data.Analysis/​DataFrameColumn.cs Clarifies clone append semantics.
src/​Microsoft.Data.Analysis/​DataFrameColumns/​VBufferDataFrameColumn.cs Implements default-value appends.
src/​Microsoft.Data.Analysis/​PrimitiveDataFrameColumn.cs Removes the source-length limit on enumerable maps.
test/​Microsoft.Data.Analysis.Tests/​VBufferColumnTests.cs Tests appended default vectors.
test/​Microsoft.Data.Analysis.Tests/​PrimitiveDataFrameColumnTests.cs Tests longer enumerable maps.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@svick
svick marked this pull request as ready for review October 2, 2026 16:13
Base automatically changed from svick/clarify-dataframe-filter-docs to main October 14, 2026 13:38
Honor appended values for VBuffer clones and allow enumerable index maps to produce more values than the source column.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@svick
svick force-pushed the svick/fix-dataframe-clone-behavior branch from 33dd381 to 75c1156 Compare October 14, 2026 13:38
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.00%. Comparing base (0e0b2a0) to head (75c1156).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7754   +/-   ##
=======================================
  Coverage   69.99%   70.00%           
=======================================
  Files        1419     1419           
  Lines      272761   272787   +26     
  Branches    27579    27581    +2     
=======================================
+ Hits       190914   190952   +38     
+ Misses      73664    73649   -15     
- Partials     8183     8186    +3     
Flag Coverage Δ
Debug 70.00% <100.00%> (+<0.01%) ⬆️
production 64.18% <100.00%> (+<0.01%) ⬆️
test 89.72% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/Microsoft.Data.Analysis/DataFrameColumn.cs 64.14% <ø> (ø)
...nalysis/DataFrameColumns/VBufferDataFrameColumn.cs 46.18% <100.00%> (+1.99%) ⬆️
...icrosoft.Data.Analysis/PrimitiveDataFrameColumn.cs 72.42% <100.00%> (-0.12%) ⬇️
...ta.Analysis.Tests/PrimitiveDataFrameColumnTests.cs 99.74% <100.00%> (+<0.01%) ⬆️
...icrosoft.Data.Analysis.Tests/VBufferColumnTests.cs 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@svick

svick commented Oct 14, 2026 •

Copy link
Copy Markdown
Member Author

This PR needs to be re-approved, because I merged the previous PR in the PR stack.

@svick
svick requested a review from rosebyte October 14, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants