PARTITION BY RANGE vs PARTITION BY RANGE COLUMNS are not clear
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 617
- Forks
- 724
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 223
Description
Change Request
Please answer the following questions before submitting your issue. Thanks!
- Describe what you find is inappropriate or missing in the existing docs.
I cannot see what the difference between PARTITION BY RANGE (col) and PARTITION BY RANGE COLUMNS (col).
- Describe your suggestion or addition.
The difference is that RANGE COLUMNS(col) can take most types of columns, while RANGE (col) only take int columns.
See:
tidb> create table t (a int, b varchar(255)) partition by range (b) (partition p1 values less than (""));
ERROR 1697 (HY000): VALUES value for partition 'p1' must have type INT
tidb> create table t (a int, b varchar(255)) partition by range (b) (partition p1 values less than (1));
ERROR 1659 (HY000): Field 'b' is of a not allowed type for this type of partitioning
tidb> create table t (a int, b varchar(255)) partition by range columns (b) (partition p1 values less than (""));
Query OK, 0 rows affected (0,00 sec)
- Provide some reference materials (documents, websites, etc) if you could.
https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html
https://dev.mysql.com/doc/refman/8.0/en/partitioning-columns.html
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing TiDB partitioning documentation and compare it with the cited MySQL pages on partitioning types and partitioning columns. Clarify the distinction between RANGE and RANGE COLUMNS, including the supported column types and representative examples; the documentation is done when readers can choose the appropriate syntax from the page alone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100