release-8.5: clarify IMPORT INTO format detection by platform and version - #23490
release-8.5: clarify IMPORT INTO format detection by platform and version#23490alastori wants to merge 4 commits into
Conversation
|
Skipping CI for Draft Pull Request. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesIMPORT INTO format documentation
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: 🔵 Low · up to The documentation changes format detection guidance by platform and version, but the TiDB Cloud wording may conflict with its documented CSV default when FORMAT is omitted. Confirming the supported Cloud behavior and release scope is needed to avoid misleading users about SQL and Parquet imports. Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@JQWong7, could you review this documentation update for the I smoke-tested the release-8.5 backport on TiDB v8.5.7, including explicit |
d5882ac to
3f69993
Compare
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 03a36f93-0a68-4d35-b10e-e14e8d1e854f
📒 Files selected for processing (1)
sql-statements/sql-statement-import-into.md
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
♻️ Duplicate comments (1)
sql-statements/sql-statement-import-into.md (1)
135-135: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winLimit the explicit-
FORMATclaim to format selection.Line 135 says that
FORMATworks regardless of the file extension, but Line 141 says TiDB rejects unsupported final suffixes for local paths. Clarify that explicitFORMATcontrols parsing and does not bypass local-path suffix validation.Committable replacement
-The `IMPORT INTO` statement supports three data file formats: `CSV`, `SQL`, and `PARQUET`. When you specify the `FORMAT` clause, TiDB uses that format regardless of the file extension. +The `IMPORT INTO` statement supports three data file formats: `CSV`, `SQL`, and `PARQUET`. When you specify the `FORMAT` clause, TiDB uses that format for parsing instead of detecting it from the file extension. For TiDB local file paths, the final suffix validation described above still applies.Source: Path instructions
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 1ffaec93-6026-49d1-8112-d7de51da71bc
📒 Files selected for processing (1)
sql-statements/sql-statement-import-into.md
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
@JQWong7 PTAL. You implemented the underlying automatic file type detection in pingcap/tidb#59543, so your review of the platform-specific and version-specific behavior documented here would be especially helpful. |
What is changed, added or deleted? (Required)
This PR aligns the
IMPORT INTOformat documentation onrelease-8.5with the behavior released in TiDB v8.5.7 and the current TiDB Cloud behavior:FORMATclause overrides file-extension detection.FORMATusesCSV..csv,.sql, and.parquetfiles in the applicable versions and platform.CSV, while TiDB local paths require a supported final suffix.Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
Validation
./scripts/markdownlint sql-statements/sql-statement-import-into.mdpython3 scripts/file-format-lint.py sql-statements/sql-statement-import-into.mdpython3 scripts/check-manual-line-breaks.py sql-statements/sql-statement-import-into.mdgit diff --checkAPPROVED, with no findings.go test -tags=intest,deadlock ./pkg/executor/importer -run 'Test(SupportedSuffixForServerDisk|ParseFileType)$' -count=1against the TiDB v8.5.7 tag..gz,.gzip,.zstd,.zst, and.snappysuffixes; missing and unrecognized extension fallback; explicitFORMAToverride; and homogeneous wildcard imports..csvand.sqlwildcard created an import job and failed while parsing the SQL file as CSV. It did not fail during precheck, and the target table remained empty.AI agent involvement
Do your changes match any of the following descriptions?
Summary by CodeRabbit
FORMATis omitted.