cockroachdb / cockroachdb/cockroach

sql: show range of partition in range format

Open Beginner friendly
#173,103 2 comments 0 reactions 0 assignees View on GitHub
A-partitioning C-enhancement E-easy E-quick-win T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

The current output of SHOW PARITIONS use the `x TO y` format for the partition value, which can be confusing for the open/close bound the start and the end value.

```
root@localhost:26257/mq> show partitions from table mq;
-[ RECORD 1 ]
index_name | mq@pk_mq
partition_value | (0) TO (86) -- is 86 included or excluded in the partiition 1?
...
```

Can be better understood if we write it into `[0, 86)`, for instance.

Jira issue: CRDB-66412

Contributor guide

Open the contributing guide

Research direction

Start by tracing the SHOW PARTITIONS entry point and reading its existing SQL tests for partition output. Confirm the range-bound conventions used there, then change the displayed range to bracket notation and run the relevant tests to verify that inclusivity is unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
databases
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.