-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
priority:highMust be in the next sprintMust be in the next sprintsize:xsTrivial — less than 1 hourTrivial — less than 1 hourstatus:readyRefined and ready for sprint selectionRefined and ready for sprint selectiontype:bugSomething isn't workingSomething isn't working
Milestone
Description
Description
When a CSV has duplicate column names (e.g., two columns both named value), sql-pipe silently renames them by appending a suffix (value, value_1, value_2). The user has no way to know this happened and may write queries against the original names that silently select the wrong column.
Example
$ printf 'id,value,value\n1,a,b' | sql-pipe 'SELECT value_1 FROM t'
bThe user expected column value but had to guess the renamed form value_1.
Acceptance Criteria
- When one or more column names are deduplicated, print a warning to stderr listing each rename:
warning: duplicate column "value" renamed to "value_1" - Warning is written to stderr so it does not corrupt stdout (CSV/JSON output)
- Warning is suppressed when stderr is not a TTY (pipe mode) — or printed always, consistently; decide and document
- Existing tests still pass; add a test for the warning message
Notes
- Deduplication logic is in
src/main.zigaround lines 356–364 - Format:
warning: duplicate column "<original>" renamed to "<new>"(one line per rename)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority:highMust be in the next sprintMust be in the next sprintsize:xsTrivial — less than 1 hourTrivial — less than 1 hourstatus:readyRefined and ready for sprint selectionRefined and ready for sprint selectiontype:bugSomething isn't workingSomething isn't working