Skip to content

feat(mysql): CSV encoding and format options (#2601) - #2653

Merged
openai0229 merged 43 commits into
OtterMind:mainfrom
Aias00:feature/mysql-csv-options-2601
Sep 10, 2026
Merged

openai0229 merged 43 commits into
OtterMind:mainfrom
Aias00:feature/mysql-csv-options-2601

Conversation

@Aias00

@Aias00 Aias00 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Closes #2601

Summary

  • New CsvParser shared by preview and execution: UTF-8/GB18030/ISO-8859-1 (strict decoding), single-char delimiter (comma/semicolon/tab/pipe), quote/escape chars, header toggle, CRLF/LF/CR detection, embedded newlines and quoted delimiters.
  • Empty-field rule (empty string vs SQL NULL) applies identically to preview and import; invalid encoding / unclosed quote rejected with source line before any write.
  • Formula-injection guard: values starting with = + - @ are single-quoted on import.
  • Mapping modal: CSV options bar (encoding, delimiter, header, empty-field) that refreshes the bounded preview immediately.
  • i18n ×5 + MYSQL-IMPORT-002 byte-accurate fixtures (GB18030/Latin-1, semicolon/tab, CRLF, no-header, bad-quote).

Test plan

  • Run MYSQL-IMPORT-002 README verification (3 encodings, 4 delimiters, CRLF embedded newline, no-header, unclosed-quote rejection, empty-field rule, large-file bounded preview)

@Aias00
Aias00 requested a review from openai0229 as a code owner August 7, 2026 08:47
Copilot AI lite review requested due to automatic review settings August 7, 2026 08:47

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.

@openai0229

openai0229 commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up review after the latest main integration: changes are still requested before merge.

This remains cumulative on #2652 and inherits its unchecked/full-file path handling, synchronous execution, DEFAULT placeholder mismatch, zero skipped count, and per-row batch/transaction problems. CSV options also need strict validation and source-line diagnostics for malformed encoding or quoting, with preview and execution sharing one bounded parsing/mapping contract. Please correct the cumulative implementation and rerun CI.

@Aias00
Aias00 force-pushed the feature/mysql-csv-options-2601 branch from 7045504 to 347ff7c Compare August 22, 2026 02:02
@Aias00
Aias00 requested a review from a team as a code owner August 22, 2026 02:02
@openai0229

Copy link
Copy Markdown
Contributor

Please sync this branch with the latest main and resolve the current conflicts before the next review. In particular, preserve the import preview and column-mapping behavior already merged through #2652 rather than replacing it with the older cumulative implementation. Once the branch is updated and CI has rerun on the new head, we can continue reviewing the CSV-specific changes.

Signed-off-by: zgq <openai0229@gmail.com>
@openai0229
openai0229 merged commit 1db0a8b into OtterMind:main Sep 10, 2026
15 of 16 checks passed
@openai0229 openai0229 moved this from In Review to Done in Chat2DB Community Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[MYSQL-IMPORT-002] Support CSV encoding and format options

4 participants