Skip to content

Docs: update description of serial #19443

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

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

shnikd
Copy link
Contributor

@shnikd shnikd commented Jun 6, 2025

@shnikd shnikd requested a review from a team as a code owner June 6, 2025 13:00
Copy link

github-actions bot commented Jun 6, 2025

🟢 2025-06-06 13:10:22 UTC The validation of the Pull Request description is successful.

Copy link

github-actions bot commented Jun 6, 2025

2025-06-06 13:02:07 UTC Pre-commit check linux-x86_64-relwithdebinfo for b1a58d3 has started.
2025-06-06 13:02:19 UTC Artifacts will be uploaded here
2025-06-06 13:04:37 UTC ya make is running...
🟢 2025-06-06 13:04:42 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-06-06 13:04:48 UTC Build successful.

Copy link

github-actions bot commented Jun 6, 2025

2025-06-06 13:02:18 UTC Pre-commit check linux-x86_64-release-asan for b1a58d3 has started.
2025-06-06 13:02:30 UTC Artifacts will be uploaded here
2025-06-06 13:04:48 UTC ya make is running...
🟢 2025-06-06 13:04:54 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-06-06 13:04:59 UTC Build successful.

@github-actions github-actions bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Jun 6, 2025
@shnikd shnikd force-pushed the YDBDOCS-1142-serial branch from 4a3ee88 to 8f4234b Compare June 6, 2025 13:11
Copy link

github-actions bot commented Jun 6, 2025

2025-06-06 13:13:19 UTC Pre-commit check linux-x86_64-release-asan for 33df5ec has started.
2025-06-06 13:13:29 UTC Artifacts will be uploaded here
2025-06-06 13:15:52 UTC ya make is running...
🟢 2025-06-06 13:15:57 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-06-06 13:16:03 UTC Build successful.

Copy link

github-actions bot commented Jun 6, 2025

2025-06-06 13:14:25 UTC Pre-commit check linux-x86_64-relwithdebinfo for 33df5ec has started.
2025-06-06 13:14:36 UTC Artifacts will be uploaded here
2025-06-06 13:16:56 UTC ya make is running...
🟢 2025-06-06 13:17:01 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-06-06 13:17:07 UTC Build successful.

Copy link

github-actions bot commented Jun 6, 2025

❌ Documentation build

Revision build failed

Build logs

Errors (3)

❌ Cannot read properties of undefined (reading 'openCondition')

❌ Link is unreachable: en/reference/ydb-cli/workload-query.md in en/changelog-cli.md.

❌ Link is unreachable: ru/reference/ydb-cli/workload-query.md in ru/changelog-cli.md.

Warnings (8)

⚠️ Title not found: ./index.md in ru/yql/reference/syntax/create_table/with.md

⚠️ en/yql/reference/types/serial.md: 67: MD034 / no-bare-urls Bare URL used [Context: "alice@example.com"]

⚠️ en/yql/reference/types/serial.md: 68: MD034 / no-bare-urls Bare URL used [Context: "bob@example.com"]

⚠️ en/yql/reference/types/serial.md: 69: MD034 / no-bare-urls Bare URL used [Context: "john@example.com"]

⚠️ ru/yql/reference/syntax/alter-sequence.md: 5: MD026 / no-trailing-punctuation Trailing punctuation in heading [Punctuation: ':']

⚠️ ru/yql/reference/types/serial.md: 72: MD034 / no-bare-urls Bare URL used [Context: "alice@example.com"]

⚠️ ru/yql/reference/types/serial.md: 73: MD034 / no-bare-urls Bare URL used [Context: "bob@example.com"]

⚠️ ru/yql/reference/types/serial.md: 74: MD034 / no-bare-urls Bare URL used [Context: "john@example.com"]

Copy link

github-actions bot commented Jun 6, 2025

2025-06-06 13:40:48 UTC Pre-commit check linux-x86_64-relwithdebinfo for 92b592c has started.
2025-06-06 13:41:02 UTC Artifacts will be uploaded here
2025-06-06 13:43:33 UTC ya make is running...
🟢 2025-06-06 13:43:39 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-06-06 13:43:45 UTC Build successful.

Copy link

github-actions bot commented Jun 6, 2025

2025-06-06 13:43:14 UTC Pre-commit check linux-x86_64-release-asan for 92b592c has started.
2025-06-06 13:43:25 UTC Artifacts will be uploaded here
2025-06-06 13:45:52 UTC ya make is running...
🟢 2025-06-06 13:45:58 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-06-06 13:46:04 UTC Build successful.

Copy link

github-actions bot commented Jun 6, 2025

❌ Documentation build

Revision build failed

Build logs

Errors (2)

❌ Link is unreachable: en/reference/ydb-cli/workload-query.md in en/changelog-cli.md.

❌ Link is unreachable: ru/reference/ydb-cli/workload-query.md in ru/changelog-cli.md.

@shnikd shnikd force-pushed the YDBDOCS-1142-serial branch 2 times, most recently from 30814b1 to 326f594 Compare June 6, 2025 14:07
Copy link

github-actions bot commented Jun 6, 2025

2025-06-06 14:11:03 UTC Pre-commit check linux-x86_64-relwithdebinfo for 0e00772 has started.
2025-06-06 14:11:15 UTC Artifacts will be uploaded here
2025-06-06 14:13:43 UTC ya make is running...
🟢 2025-06-06 14:13:49 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-06-06 14:13:55 UTC Build successful.

Copy link

github-actions bot commented Jun 6, 2025

2025-06-06 14:11:12 UTC Pre-commit check linux-x86_64-release-asan for 0e00772 has started.
2025-06-06 14:11:24 UTC Artifacts will be uploaded here
2025-06-06 14:13:52 UTC ya make is running...
🟢 2025-06-06 14:13:58 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-06-06 14:14:04 UTC Build successful.

Copy link

github-actions bot commented Jun 6, 2025

✅ Documentation build

Revision built successfully
Revision preview link

@gridnevvvit gridnevvvit requested a review from Copilot June 6, 2025 15:08
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enriches the documentation around the new Serial types by expanding descriptions, adding syntax references, and updating navigation entries.

  • Expanded Serial type docs with Sequence behavior, parameters, and overflow notes
  • Introduced ALTER SEQUENCE syntax reference and linked it in ToC/index files
  • Enhanced examples to recommend hash-based partitioning and updated CLI guidance for exporting serial columns

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ydb/docs/ru/core/yql/reference/types/serial.md Expanded Russian Serial docs with Sequence details and examples
ydb/docs/ru/core/yql/reference/syntax/toc_i.yaml Added ALTER SEQUENCE to Russian syntax ToC
ydb/docs/ru/core/yql/reference/syntax/index.md Exposed ALTER SEQUENCE in Russian syntax index
ydb/docs/ru/core/yql/reference/syntax/create_table/index.md Updated Russian CREATE TABLE type allowance text
ydb/docs/ru/core/yql/reference/syntax/alter-sequence.md New Russian ALTER SEQUENCE syntax reference
ydb/docs/en/core/yql/reference/types/toc_i.yaml Added Serial entry to English types ToC
ydb/docs/en/core/yql/reference/types/serial.md New English Serial type documentation
ydb/docs/en/core/yql/reference/types/index.md Linked Serial in English types index
ydb/docs/en/core/yql/reference/syntax/toc_i.yaml Added ALTER SEQUENCE to English syntax ToC
ydb/docs/en/core/yql/reference/syntax/index.md Exposed ALTER SEQUENCE in English syntax index
ydb/docs/en/core/yql/reference/syntax/create_table/index.md Updated English CREATE TABLE type allowance text
ydb/docs/en/core/yql/reference/syntax/alter-sequence.md New English ALTER SEQUENCE syntax reference
ydb/docs/en/core/reference/ydb-cli/export-import/_includes/tools_dump.md Clarified --avoid-copy impact on serial exports
Comments suppressed due to low confidence (2)

ydb/docs/en/core/reference/ydb-cli/export-import/_includes/tools_dump.md:54

  • [nitpick] Link text [serial] should match the title casing used elsewhere (Serial). Consider updating link text to [Serial] for consistency.
`--avoid-copy`: Do not create a snapshot before dumping. The default consistency snapshot might be inapplicable in some cases (for example, for tables with external blobs).{% if feature_serial %} For correct export of tables with [serial](../../../../yql/reference/types/serial.md) types, this parameter should not be set. Otherwise, the current value of the sequence generator will not be copied, and new values will start from the initial value, which may lead to primary key conflicts.{% endif %}

Copy link

github-actions bot commented Jun 6, 2025

2025-06-06 16:05:30 UTC Pre-commit check linux-x86_64-relwithdebinfo for fbaf0dd has started.
2025-06-06 16:05:41 UTC Artifacts will be uploaded here
2025-06-06 16:08:05 UTC ya make is running...
🟢 2025-06-06 16:08:11 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-06-06 16:08:17 UTC Build successful.

Copy link

github-actions bot commented Jun 6, 2025

2025-06-06 16:05:34 UTC Pre-commit check linux-x86_64-release-asan for fbaf0dd has started.
2025-06-06 16:05:45 UTC Artifacts will be uploaded here
2025-06-06 16:08:05 UTC ya make is running...
🟢 2025-06-06 16:08:10 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-06-06 16:08:16 UTC Build successful.

Copy link

github-actions bot commented Jun 6, 2025

✅ Documentation build

Revision built successfully
Revision preview link

RESTART 1000;
```

An alternative way to achieve the same result is to first change the start value, and then `RESTART` the `Sequence`. After this, subsequent calls to `RESTART` without an explicit value will set the current value to 1000:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
An alternative way to achieve the same result is to first change the start value, and then `RESTART` the `Sequence`. After this, subsequent calls to `RESTART` without an explicit value will set the current value to 1000:
An alternative way to achieve the same result is to first change the start value, and then `RESTART` the `Sequence`. After this, subsequent call to `RESTART` without an explicit value will set the current value to 1000:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут именно все последующие вызовы

RESTART 1000;
```

An alternative way to achieve the same result is to first change the start value, and then `RESTART` the `Sequence`. After this, subsequent calls to `RESTART` without an explicit value will set the current value to 1000:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужно пояснение, в каких случаях может быть полезен двухшаговый вариант установки нового стартового значения

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну тут в целом и описано, что теперь все последующие вызовы RESTART будут сбрасывать к новому стартовому значению, такой же функционал сейчас в PostgreSql.

По умолчанию генерируемые значения начинаются с единицы, увеличиваются на один при каждом новом значении и ограничены в соответствии с выбранным типом.

> **Примечание:**
> Колонки типа `Serial` поддерживаются как для колонок, входящих в состав первичного ключа, так и для неключевых колонок.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

надо выбрать - колонки или столбцы в соответствии как сделано в основной доке русской (не уверена) и поправить так всюду по тексту

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В доке сейчас используются и столбцы и колонки

> **Примечание:**
> Колонки типа `Serial` поддерживаются как для колонок, входящих в состав первичного ключа, так и для неключевых колонок.
>
> Однако такие колонки нельзя [изменить](../syntax/alter_table/family#mod-column-groups) или [удалить](../syntax/alter_table/columns.md) из таблицы —
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> Однако такие колонки нельзя [изменить](../syntax/alter_table/family#mod-column-groups) или [удалить](../syntax/alter_table/columns.md) из таблицы
> Однако такие колонки нельзя [изменить](../syntax/alter_table/family#mod-column-groups) или [удалить](../syntax/alter_table/columns.md) из таблицы,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь тоже следствие и кажется правильнее использовать тире

@ydbot
Copy link
Collaborator

ydbot commented Jun 9, 2025

🔄 New commits pushed — @ElenaAfina please take a look.

1 similar comment
@ydbot
Copy link
Collaborator

ydbot commented Jun 9, 2025

🔄 New commits pushed — @ElenaAfina please take a look.

shnikd and others added 7 commits June 30, 2025 17:02
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: ElenaAfina <144937430+ElenaAfina@users.noreply.github.com>
Co-authored-by: ElenaAfina <144937430+ElenaAfina@users.noreply.github.com>
Co-authored-by: ElenaAfina <144937430+ElenaAfina@users.noreply.github.com>
@ydbot
Copy link
Collaborator

ydbot commented Jun 30, 2025

🔄 New commits pushed — @ElenaAfina please take a look.

shnikd and others added 9 commits June 30, 2025 17:04
Co-authored-by: ElenaAfina <144937430+ElenaAfina@users.noreply.github.com>
Co-authored-by: ElenaAfina <144937430+ElenaAfina@users.noreply.github.com>
Co-authored-by: ElenaAfina <144937430+ElenaAfina@users.noreply.github.com>
Co-authored-by: ElenaAfina <144937430+ElenaAfina@users.noreply.github.com>
Co-authored-by: ElenaAfina <144937430+ElenaAfina@users.noreply.github.com>
Co-authored-by: ElenaAfina <144937430+ElenaAfina@users.noreply.github.com>
Co-authored-by: Ivan Blinkov <ivan@blinkov.ru>
Copy link

github-actions bot commented Jun 30, 2025

2025-06-30 14:06:20 UTC Pre-commit check linux-x86_64-relwithdebinfo for 32b41e8 has started.
2025-06-30 14:07:07 UTC Artifacts will be uploaded here
2025-06-30 14:08:57 UTC Check cancelled

Copy link

github-actions bot commented Jun 30, 2025

2025-06-30 14:08:15 UTC Pre-commit check linux-x86_64-release-asan for 32b41e8 has started.
2025-06-30 14:08:27 UTC Artifacts will be uploaded here
2025-06-30 14:08:57 UTC Check cancelled

@shnikd shnikd force-pushed the YDBDOCS-1142-serial branch from 1faffc2 to df88c9f Compare June 30, 2025 14:08
@ydbot
Copy link
Collaborator

ydbot commented Jun 30, 2025

🔄 New commits pushed — @ElenaAfina please take a look.

Copy link

github-actions bot commented Jun 30, 2025

2025-06-30 14:11:49 UTC Pre-commit check linux-x86_64-relwithdebinfo for f5c42bb has started.
2025-06-30 14:11:54 UTC Artifacts will be uploaded here
2025-06-30 14:14:15 UTC ya make is running...
🟢 2025-06-30 14:14:22 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-06-30 14:14:28 UTC Build successful.

Copy link

github-actions bot commented Jun 30, 2025

2025-06-30 14:13:37 UTC Pre-commit check linux-x86_64-release-asan for f5c42bb has started.
2025-06-30 14:14:07 UTC Artifacts will be uploaded here
2025-06-30 14:17:15 UTC ya make is running...
🟢 2025-06-30 14:17:22 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-06-30 14:17:29 UTC Build successful.

Copy link

✅ Documentation build

Revision built successfully
Revision preview link

Build logs

Warnings (2)

⚠️ ru/yql/reference/types/serial.md: 40: MD022 / blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "<<<<<<< HEAD"]

⚠️ ru/yql/reference/types/serial.md: 41: MD026 / no-trailing-punctuation Trailing punctuation in heading [Punctuation: '.']

@ydbot
Copy link
Collaborator

ydbot commented Jun 30, 2025

🔄 New commits pushed — @ElenaAfina please take a look.

Copy link

github-actions bot commented Jun 30, 2025

2025-06-30 14:35:59 UTC Pre-commit check linux-x86_64-release-asan for f44a1e8 has started.
2025-06-30 14:36:25 UTC Artifacts will be uploaded here
2025-06-30 14:39:38 UTC ya make is running...
🟢 2025-06-30 14:39:44 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-06-30 14:39:51 UTC Build successful.

Copy link

github-actions bot commented Jun 30, 2025

2025-06-30 14:36:21 UTC Pre-commit check linux-x86_64-relwithdebinfo for f44a1e8 has started.
2025-06-30 14:36:34 UTC Artifacts will be uploaded here
2025-06-30 14:39:02 UTC ya make is running...
🟢 2025-06-30 14:39:09 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-06-30 14:39:16 UTC Build successful.

Copy link

✅ Documentation build

Revision built successfully
Revision preview link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants