Skip to content

Handle added and removed columns with dots in their names - #57

Open
puzi12138 wants to merge 1 commit into
simonw:mainfrom
puzi12138:fix/dotted-column-names
Open

puzi12138 wants to merge 1 commit into
simonw:mainfrom
puzi12138:fix/dotted-column-names

Conversation

@puzi12138

Copy link
Copy Markdown

Closes #40.

Comparing two files can raise ValueError when a column with a dot in its name is added or removed. For example, renaming name.date_range to name..date_range causes the row comparison to encounter a column removal while it is unpacking a pair of changed values.

This filters the added and removed columns by their literal names before comparing the two rows. The schema changes are still reported once, and edits to shared columns such as name.title still appear in the row diff.

The new CLI regression tests exercise both CSV and JSON input. Both failed before the fix, and the full suite passes with it (26 tests).

OpenAI Codex prepared and tested this change.

This branch has not been deployed

No deployments
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.

Error when column name contains ".." (two dots)

1 participant