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

Adapt suite tests for cs #13204

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

zverevgeny
Copy link
Collaborator

Changelog category

  • Not for changelog (changelog entry is not required)

@zverevgeny zverevgeny requested a review from a team as a code owner January 9, 2025 06:36
Copy link

github-actions bot commented Jan 9, 2025

2025-01-09 06:40:04 UTC Pre-commit check linux-x86_64-relwithdebinfo for 10f46ec has started.
2025-01-09 06:40:16 UTC Artifacts will be uploaded here
2025-01-09 06:43:17 UTC ya make is running...
2025-01-09 06:43:56 UTC Check cancelled

Copy link

github-actions bot commented Jan 9, 2025

2025-01-09 06:40:08 UTC Pre-commit check linux-x86_64-release-asan for 10f46ec has started.
2025-01-09 06:40:20 UTC Artifacts will be uploaded here
2025-01-09 06:43:10 UTC ya make is running...
2025-01-09 06:43:57 UTC Check cancelled

@zverevgeny zverevgeny force-pushed the adapt_suite_tests_for_cs branch from 190b207 to bdcdd21 Compare January 9, 2025 06:43
Copy link

github-actions bot commented Jan 9, 2025

2025-01-09 06:47:52 UTC Pre-commit check linux-x86_64-relwithdebinfo for d002a38 has started.
2025-01-09 06:48:05 UTC Artifacts will be uploaded here
2025-01-09 06:50:36 UTC ya make is running...
🟢 2025-01-09 06:55:08 UTC Tests successful.

Test history | Ya make output | Test bloat

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

🟢 2025-01-09 06:55:14 UTC Build successful.
🟢 2025-01-09 06:55:26 UTC ydbd size 2.1 GiB changed* by 0 Bytes, which is <= 0 Bytes vs main: OK

ydbd size dash main: bc52487 merge: d002a38 diff diff %
ydbd size 2 244 317 464 Bytes 2 244 317 464 Bytes 0 Bytes 0.000%
ydbd stripped size 472 336 560 Bytes 472 336 560 Bytes 0 Bytes 0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Jan 9, 2025

2025-01-09 06:48:00 UTC Pre-commit check linux-x86_64-release-asan for d002a38 has started.
2025-01-09 06:48:11 UTC Artifacts will be uploaded here
2025-01-09 06:50:39 UTC ya make is running...
🟢 2025-01-09 06:50:44 UTC Tests successful.

Test history | Ya make output | Test bloat

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

🟢 2025-01-09 06:50:50 UTC Build successful.

type = StatementDefinition._parse_statement_type(lines[0])
if type is None:
type, table_types = StatementDefinition._parse_statement_type(lines[0])
if type is None and table_types:
Copy link
Collaborator

@maximyurchuk maximyurchuk Jan 9, 2025

Choose a reason for hiding this comment

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

Логика неправильная мне кажется: пусть _parse_statement_type кидает когда не знает что с этим делать, а не вызывающая сторона. Когда условие было простым, было еще более менее, а сейчас стало хуже

+ я не совсем понимаю, почему мы должны игнорить непонятный тип, если у нас table_types пустой

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

есть строчки вида:
statement skipped <произвольный текст>
Поэтому для skipped тестов не важен тип

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Выкидывать исключение можно и из _parse_statement_type, но тогда туда нужно имя сьюта и номер строки передавать только для исключения. Не уверен, что это сильно лучше

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

поправил

@@ -431,16 +464,55 @@ def explain(self, query):
return self.legacy_pool.retry_operation_sync(lambda s: s.explain(yql_text)).query_plan

def execute_query(self, statement: StatementDefinition, amended_text: str = None):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Я бы предложил написать коммент к функции, мол она выполняет запрос, и что scan/row/column/... результаты одинаковы

return c
return 0

sorted_result_row = sorted(flatten_result(result_row), key=cmp_to_key(compare))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Я мб что-то не понимаю, но почему scan vs row мы не сортируем, а вот row vs column мы это делаем?

Возможно было бы правильнее сортировать безусловно для все случаев

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Это же ослабит проверку. Сейчас ожидается, что они совпадают и без дополнительной сортировки.

Copy link
Collaborator

Choose a reason for hiding this comment

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

А в чем смысл такой проверки? Если какой-нибудь ORDER BY не указан, то они точно должны совпадать?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Не знаю. Я в DS не сильно ориентируюсь. Ну и странно ослаблять проверку DS при добавлении CS

Copy link
Collaborator

Choose a reason for hiding this comment

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

Так проверка некорректная, имхо (нужна сортировка)

Ты сделал корректно для cs (вероятно потому что иначе не проходило), но я не вижу причин не сделать точно так же для ds

Copy link

github-actions bot commented Jan 9, 2025

2025-01-09 11:04:24 UTC Pre-commit check linux-x86_64-release-asan for a61a821 has started.
2025-01-09 11:04:36 UTC Artifacts will be uploaded here
2025-01-09 11:07:00 UTC ya make is running...
🟢 2025-01-09 11:07:06 UTC Tests successful.

Test history | Ya make output | Test bloat

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

🟢 2025-01-09 11:07:11 UTC Build successful.

Copy link

github-actions bot commented Jan 9, 2025

2025-01-09 11:05:12 UTC Pre-commit check linux-x86_64-relwithdebinfo for a61a821 has started.
2025-01-09 11:05:25 UTC Artifacts will be uploaded here
2025-01-09 11:07:59 UTC ya make is running...
🟢 2025-01-09 11:17:30 UTC Tests successful.

Test history | Ya make output | Test bloat

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

🟢 2025-01-09 11:17:37 UTC Build successful.
🟢 2025-01-09 11:17:48 UTC ydbd size 2.1 GiB changed* by +4.1 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 592bc99 merge: a61a821 diff diff %
ydbd size 2 244 699 432 Bytes 2 244 703 672 Bytes +4.1 KiB +0.000%
ydbd stripped size 472 406 672 Bytes 472 407 248 Bytes +576 Bytes +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@zverevgeny zverevgeny merged commit 275b86e into ydb-platform:main Jan 9, 2025
12 checks passed
@zverevgeny zverevgeny linked an issue Jan 21, 2025 that may be closed by this pull request
azevaykin pushed a commit to azevaykin/ydb that referenced this pull request Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapt suite_tests for running on column tables
2 participants