Skip to content

fix: preserve duplicate CSV columns - #20

Merged
haolpku merged 1 commit into
OpenDCAI:mainfrom
DevChiniwala:codex/fix-duplicate-csv-columns
Sep 20, 2026
Merged

haolpku merged 1 commit into
OpenDCAI:mainfrom
DevChiniwala:codex/fix-duplicate-csv-columns

Conversation

@DevChiniwala

Copy link
Copy Markdown
Contributor

CSV headers were sanitized for SQL syntax but duplicate valid names were left unchanged, causing CREATE TABLE to fail and dict-based row construction to discard one value. This assigns deterministic unique fallback names to later duplicates, preserving every imported field. Added a SQLite import regression covering duplicate headers and both values. Validation: 6 replacement/import tests passed; no API or schema changes beyond deterministic import column naming; targets main.

Copilot AI lite review requested due to automatic review settings September 17, 2026 10:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@haolpku haolpku left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Requesting changes because duplicate detection is case-sensitive. SQLite and several SQL backends treat identifiers case-insensitively, so a CSV header such as a,A still reaches CREATE TABLE with duplicate column names. Please track normalized/case-folded identifiers when allocating names and add regressions for a,A and collisions with generated col_N names.

@haolpku
haolpku merged commit 70fd675 into OpenDCAI:main Sep 20, 2026
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.

3 participants