Skip to content

fix: isolate headers in derived tables - #143

Open
Shubham-Padkonde wants to merge 1 commit into
google:masterfrom
Shubham-Padkonde:fix/independent-derived-table-headers
Open

Shubham-Padkonde wants to merge 1 commit into
google:masterfrom
Shubham-Padkonde:fix/independent-derived-table-headers

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Tables returned by copy.copy, Filter, Map, and addition share the original header object even though their data rows are independent. Adding a column to the result therefore mutates the original header without extending its rows, leaving the original table inconsistent.

Copy the header in the three table-construction paths, matching the existing independent treatment of row values. Addition benefits through __copy__.

All four regression subcases fail before the fix. All 102 tests pass afterward; git diff --check passes. Tests verify that adding columns to either table leaves the other's header unchanged.

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.

1 participant