pingcap / pingcap/tidb

cannot show the condition with shard index in the PointGet

Open
#61,667 0 comments 0 reactions 1 assignee Claimed by @hawkingrei View on GitHub
severity/moderate sig/planner type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

```
create table test3(id int primary key clustered, a int, b int, unique key uk_expr((tidb_shard(a)),a));
explain format=brief select * from test3 where a=100;
```

### 2. What did you expect to see? (Required)

```
id estRows task access object operator info
Projection 1.00 root explain_shard_index.test3.id, explain_shard_index.test3.a, explain_shard_index.test3.b
└─Point_Get 1.00 root table:test3, index:uk_expr(tidb_shard(`a`), a) condition: [eq(tidb_shard(explain_shard_index.test3.a), 8) eq(explain_shard_index.test3.a, 100)]
```
### 3. What did you see instead (Required)

```
id estRows task access object operator info
Projection 1.00 root explain_shard_index.test3.id, explain_shard_index.test3.a, explain_shard_index.test3.b
└─Point_Get 1.00 root table:test3, index:uk_expr(tidb_shard(`a`), a)
```
### 4. What is your TiDB version? (Required)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.