IMPORT INTO: update document for SHOW IMPORT#21610
Conversation
Signed-off-by: Ruihao Chen <ruihao.chen@pingcap.cn>
There was a problem hiding this comment.
Summary of Changes
Hello @joechenrh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request significantly enhances the documentation for TiDB's IMPORT INTO feature. It introduces comprehensive documentation for the new SHOW IMPORT GROUP statement, which allows users to monitor the progress of grouped import jobs. Additionally, it updates existing documentation for IMPORT INTO to include a GROUP_KEY option and enriches the SHOW IMPORT JOB documentation with more detailed progress metrics.
Highlights
- Introduced SHOW IMPORT GROUP Documentation: A new dedicated markdown file (sql-statements/sql-statement-show-import-group.md) has been added to detail the syntax, usage, required privileges, and output fields for the SHOW IMPORT GROUP and SHOW IMPORT GROUPS statements.
- Enhanced IMPORT INTO Statement: The IMPORT INTO statement documentation (sql-statements/sql-statement-import-into.md) now includes a new GROUP_KEY option, enabling users to associate import jobs with specific groups.
- Improved SHOW IMPORT JOB Details: The SHOW IMPORT JOB documentation (sql-statements/sql-statement-show-import-job.md) has been updated to provide more granular progress information, including Last_Update_Time, Cur_Step, Cur_Step_Processed_Size, Cur_Step_Total_Size, Cur_Step_Progress_Pct, Cur_Step_Speed, and Cur_Step_ETA.
- Table of Contents and Privilege Updates: The TOC.md and privilege-management.md files have been updated to reflect the inclusion of the new SHOW IMPORT GROUP statement and its associated privilege requirements.
- Cross-referencing: Relevant "See also" sections in sql-statements/sql-statement-cancel-import-job.md and the sql-statements/sql-statement-overview.md have been updated to link to the new SHOW IMPORT GROUP documentation.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request introduces documentation for the new SHOW IMPORT GROUP statement and updates related files. The changes are generally well-executed, adding a new feature to the documentation. My review focuses on improving clarity, consistency, and correctness. I've identified a few issues, including an incorrect link, some misleading descriptions, and formatting errors in code examples that should be addressed to enhance the quality of the documentation.
| +--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+--------------+-------------------------+---------------------+-----------------------+----------------+--------------+ | ||
| | Job_ID | Data_Source | Target_Table | Table_ID | Phase | Status | Source_File_Size | Imported_Rows | Result_Message | Create_Time | Start_Time | End_Time | Created_By | Last_Update_Time | Cur_Step | Cur_Step_Processed_Size | Cur_Step_Total_Size | Cur_Step_Progress_Pct | Cur_Step_Speed | Cur_Step_ETA | | ||
| +--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+--------------+-------------------------+---------------------+-----------------------+----------------+--------------+ | ||
| | 2 | /path/to/file.csv | `test`.`bar` | 118 | global-sorting | running | 277.5GiB | 0 | | 2025-07-09 10:40:18.580706 | 2025-07-09 10:40:19.092528 | NULL | root@% | 2025-07-09 10:47:15 | encode | 4.55GB | 298GB | 1 | 10.96MB/s | 07:26:03 | +--------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+----------+----------------+---------+------------------+---------------+----------------+----------------------------+----------------------------+----------+------------+---------------------+----------+-------------------------+---------------------+----------- | ||
| +--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+--------------+-------------------------+---------------------+-----------------------+----------------+--------------+ |
There was a problem hiding this comment.
Similar to the previous example, the output for SHOW IMPORT JOB 2 is corrupted with extra characters, which makes it hard to read. This should be cleaned up.1
| +--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+--------------+-------------------------+---------------------+-----------------------+----------------+--------------+ | |
| | Job_ID | Data_Source | Target_Table | Table_ID | Phase | Status | Source_File_Size | Imported_Rows | Result_Message | Create_Time | Start_Time | End_Time | Created_By | Last_Update_Time | Cur_Step | Cur_Step_Processed_Size | Cur_Step_Total_Size | Cur_Step_Progress_Pct | Cur_Step_Speed | Cur_Step_ETA | | |
| +--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+--------------+-------------------------+---------------------+-----------------------+----------------+--------------+ | |
| | 2 | /path/to/file.csv | `test`.`bar` | 118 | global-sorting | running | 277.5GiB | 0 | | 2025-07-09 10:40:18.580706 | 2025-07-09 10:40:19.092528 | NULL | root@% | 2025-07-09 10:47:15 | encode | 4.55GB | 298GB | 1 | 10.96MB/s | 07:26:03 | +--------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+----------+----------------+---------+------------------+---------------+----------------+----------------------------+----------------------------+----------+------------+---------------------+----------+-------------------------+---------------------+----------- | |
| +--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+--------------+-------------------------+---------------------+-----------------------+----------------+--------------+ | |
| +--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+----------+-------------------------+---------------------+-----------------------+----------------+------------+ | |
| | Job_ID | Data_Source | Target_Table | Table_ID | Phase | Status | Source_File_Size | Imported_Rows | Result_Message | Create_Time | Start_Time | End_Time | Created_By | Last_Update_Time | Cur_Step | Cur_Step_Processed_Size | Cur_Step_Total_Size | Cur_Step_Progress_Pct | Cur_Step_Speed | Cur_Step_ETA | | |
| +--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+----------+-------------------------+---------------------+-----------------------+----------------+------------+ | |
| | 2 | /path/to/file.csv | `test`.`bar` | 118 | global-sorting | running | 277.5GiB | 0 | | 2025-07-09 10:40:18.580706 | 2025-07-09 10:40:19.092528 | NULL | root@% | 2025-07-09 10:47:15 | encode | 4.55GB | 298GB | 1 | 10.96MB/s | 07:26:03 | | |
| +--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+----------+-------------------------+---------------------+-----------------------+----------------+------------+ |
Style Guide References
Footnotes
-
Documentation should be readable. ↩
|
[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 |
| ```ebnf+diagram | ||
| ShowImportJobsStmt ::= | ||
| 'SHOW' 'IMPORT' 'JOBS' | ||
| 'SHOW' RawOpt? 'IMPORT' 'JOBS' ShowLikeOrWhereOpt? |
There was a problem hiding this comment.
since RAW is not implemented yet, maybe update this later
There was a problem hiding this comment.
Ohhh, I see, only the parser part was added 😂
First-time contributors' checklist
What is changed, added or deleted? (Required)
Add document for
SHOW IMPORT GROUPandSHOW IMPORT JOB(s).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.
Only on master
What is the related PR or file link(s)?
code PRs: pingcap/tidb#62369
Do your changes match any of the following descriptions?