Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix typo and dead link #39317

Merged
merged 3 commits into from
Nov 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/design/2020-01-24-collations.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ The interface is quite similar to the Go [collate package](https://godoc.org/gol

### Row Format

The encoding layout of TiDB has been described in our [previous article](https://pingcap.com/blog/2017-07-11-tidbinternal2/#map). The row format should be changed to make it memory comparable, this is important to the index lookup. Basic principle is that all keys encoded for strings should use the `sortKeys` result from `Key()`/`KeyFromString()` function. However, most of the `sortKeys` calculations are not reversible.
The encoding layout of TiDB has been described in our [previous article](https://docs.pingcap.com/tidb/stable/tidb-computing). The row format should be changed to make it memory comparable, this is important to the index lookup. Basic principle is that all keys encoded for strings should use the `sortKeys` result from `Key()`/`KeyFromString()` function. However, most of the `sortKeys` calculations are not reversible.

* For table data, encodings stay unchanged. All strings are compared after decoding with the `Compare()` function.
* For table indices, we replace current `ColumnValue` with `sortKey` and encode the `ColumnValue` to the value,:
* For table indices, we replace current `ColumnValue` with `sortKey` and encode the `ColumnValue` to the value:
- For unique indices:
```
Key: tablePrefix{tableID}_indexPrefixSep{indexID}_sortKey
Expand Down