Skip to content

YQ improved s3 read / write partitions validation #20081

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 4 commits into
base: main
Choose a base branch
from

Conversation

GrigoriyPA
Copy link
Collaborator

Changelog entry

Improved s3 read / write partitions validation

Changelog category

  • Bugfix

Description for reviewers

@GrigoriyPA GrigoriyPA requested a review from a team as a code owner June 24, 2025 08:15
@GrigoriyPA GrigoriyPA requested a review from Copilot June 24, 2025 08:16
Copy link

github-actions bot commented Jun 24, 2025

2025-06-24 08:16:46 UTC Pre-commit check linux-x86_64-release-asan for e48c871 has started.
2025-06-24 08:17:17 UTC Artifacts will be uploaded here
2025-06-24 08:20:29 UTC Check cancelled

Copy link

github-actions bot commented Jun 24, 2025

2025-06-24 08:17:24 UTC Pre-commit check linux-x86_64-relwithdebinfo for e48c871 has started.
2025-06-24 08:17:45 UTC Artifacts will be uploaded here
2025-06-24 08:20:32 UTC Check cancelled

Copilot

This comment was marked as outdated.

Copy link

🔴 2025-06-24 08:18:36 UTC The validation of the Pull Request description has failed. Please update the description.

Bugfix requires a linked issue in the changelog entry

@GrigoriyPA GrigoriyPA requested a review from Copilot June 24, 2025 08:20
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 improves S3 read/write partition validation by enhancing error messages and adding extra validation checks on schema and partition definitions. Key changes include:

  • Refining error messages in the S3 datasink type annotation and path generator to display more specific details.
  • Replacing deprecated ythrow syntax with standard throw for consistency.
  • Adding new unit tests to validate raw format and partitioned-by scenarios, and updating external source validation for partitioned columns.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ydb/library/yql/providers/s3/provider/yql_s3_datasink_type_ann.cpp Improved error message by including the missing key’s content and added a validation check for write schema columns.
ydb/library/yql/providers/s3/path_generator/yql_s3_path_generator.cpp Replaced ythrow with throw and refined error messages for improved clarity on projection and storage key validations.
ydb/library/yql/providers/s3/common/util.cpp Updated raw format schema validation to explicitly check for a primitive data type.
ydb/core/kqp/ut/federated_query/s3/kqp_federated_query_ut.cpp Added unit tests for raw format insert validation and partitioned-by schema validation.
ydb/core/external_sources/object_storage_ut.cpp Introduced additional unit tests to cover failed partitioned_by validations.
ydb/core/external_sources/object_storage.cpp Enhanced partitioned_by parsing with explicit type checks and a try-catch block for improved error reporting.
Comments suppressed due to low confidence (2)

ydb/library/yql/providers/s3/path_generator/yql_s3_path_generator.cpp:357

  • [nitpick] Consider ending the error message with a period and confirming that its phrasing matches other similar messages in the file to maintain consistency.
            throw yexception() << "Partition by must always be specified with projection";

ydb/library/yql/providers/s3/common/util.cpp:223

  • [nitpick] Consider listing the supported primitive types in the error message so that users know which types are acceptable for raw format.
            ctx.AddError(TIssue(ctx.GetPosition(pos), TStringBuilder() << "Only column with primitive type allowed for raw format (you have field with type " << *rowType << ")"));

Copy link

github-actions bot commented Jun 24, 2025

2025-06-24 08:21:01 UTC Pre-commit check linux-x86_64-relwithdebinfo for eda3c3f has started.
2025-06-24 08:21:05 UTC Artifacts will be uploaded here
2025-06-24 08:24:28 UTC ya make is running...
2025-06-24 08:27:37 UTC Check cancelled

Copy link

github-actions bot commented Jun 24, 2025

2025-06-24 08:25:01 UTC Pre-commit check linux-x86_64-release-asan for eda3c3f has started.
2025-06-24 08:25:13 UTC Artifacts will be uploaded here
2025-06-24 08:27:33 UTC Check cancelled

Copy link

github-actions bot commented Jun 24, 2025

2025-06-24 08:28:53 UTC Pre-commit check linux-x86_64-release-asan for 81376d4 has started.
2025-06-24 08:28:56 UTC Artifacts will be uploaded here
2025-06-24 08:32:09 UTC ya make is running...
🟡 2025-06-24 10:10:32 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14112 13771 0 122 188 31

2025-06-24 10:11:45 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-06-24 10:49:20 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
2078 (only retried tests) 1766 0 74 211 27

2025-06-24 10:49:40 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-06-24 11:24:53 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1735 (only retried tests) 1481 0 56 171 27

🟢 2025-06-24 11:25:09 UTC Build successful.
🟢 2025-06-24 11:25:42 UTC ydbd size 3.9 GiB changed* by +8.8 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 7b9bd5d merge: 81376d4 diff diff %
ydbd size 4 187 970 728 Bytes 4 187 979 760 Bytes +8.8 KiB +0.000%
ydbd stripped size 1 451 814 552 Bytes 1 451 815 512 Bytes +960 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 Jun 24, 2025

2025-06-24 08:29:01 UTC Pre-commit check linux-x86_64-relwithdebinfo for 81376d4 has started.
2025-06-24 08:29:13 UTC Artifacts will be uploaded here
2025-06-24 08:32:36 UTC ya make is running...
🟡 2025-06-24 09:38:16 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
36365 33642 0 6 2677 40

2025-06-24 09:41:35 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-06-24 09:54:04 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
707 (only retried tests) 671 0 3 2 31

2025-06-24 09:54:17 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-06-24 10:04:40 UTC Some tests failed, follow the links below.

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
290 (only retried tests) 257 0 2 2 29

🟢 2025-06-24 10:04:49 UTC Build successful.
🟢 2025-06-24 10:05:10 UTC ydbd size 2.2 GiB changed* by +5.2 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 7b9bd5d merge: 81376d4 diff diff %
ydbd size 2 380 300 056 Bytes 2 380 305 400 Bytes +5.2 KiB +0.000%
ydbd stripped size 498 613 992 Bytes 498 614 632 Bytes +640 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 Jun 25, 2025

2025-06-25 12:05:13 UTC Pre-commit check linux-x86_64-release-asan for f73c0f5 has started.
2025-06-25 12:05:25 UTC Artifacts will be uploaded here
2025-06-25 12:08:51 UTC ya make is running...
🟡 2025-06-25 14:17:13 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14134 13708 0 139 257 30

🟢 2025-06-25 14:18:30 UTC Build successful.
🟢 2025-06-25 14:18:55 UTC ydbd size 3.9 GiB changed* by +7.3 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: c01d378 merge: f73c0f5 diff diff %
ydbd size 4 191 609 136 Bytes 4 191 616 576 Bytes +7.3 KiB +0.000%
ydbd stripped size 1 453 170 392 Bytes 1 453 171 800 Bytes +1.4 KiB +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 Jun 25, 2025

2025-06-25 12:05:40 UTC Pre-commit check linux-x86_64-relwithdebinfo for f73c0f5 has started.
2025-06-25 12:05:52 UTC Artifacts will be uploaded here
2025-06-25 12:09:17 UTC ya make is running...
🟡 2025-06-25 13:44:47 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
36401 33677 0 2 2669 53

2025-06-25 13:47:54 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-06-25 13:58:55 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
354 (only retried tests) 321 0 1 2 30

2025-06-25 13:59:05 UTC ya make is running... (failed tests rerun, try 3)
🟢 2025-06-25 14:09:36 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
292 (only retried tests) 263 0 0 2 27

🟢 2025-06-25 14:09:44 UTC Build successful.
🟢 2025-06-25 14:10:06 UTC ydbd size 2.2 GiB changed* by +4.4 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: c01d378 merge: f73c0f5 diff diff %
ydbd size 2 382 562 408 Bytes 2 382 566 944 Bytes +4.4 KiB +0.000%
ydbd stripped size 498 873 896 Bytes 498 874 536 Bytes +640 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

@GrigoriyPA GrigoriyPA force-pushed the YQ-fix-settings-validation branch from 4d84c71 to 10901e2 Compare June 27, 2025 10:39
Copy link

github-actions bot commented Jun 27, 2025

2025-06-27 10:41:48 UTC Pre-commit check linux-x86_64-release-asan for 3b8c78a has started.
2025-06-27 10:42:20 UTC Artifacts will be uploaded here
2025-06-27 10:46:29 UTC ya make is running...
🟡 2025-06-27 12:33:37 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14367 13939 0 116 283 29

🟢 2025-06-27 12:34:54 UTC Build successful.
🟢 2025-06-27 12:35:22 UTC ydbd size 3.9 GiB changed* by +8.8 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 851d661 merge: 3b8c78a diff diff %
ydbd size 4 194 813 056 Bytes 4 194 822 096 Bytes +8.8 KiB +0.000%
ydbd stripped size 1 454 050 552 Bytes 1 454 051 512 Bytes +960 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 Jun 27, 2025

2025-06-27 10:49:22 UTC Pre-commit check linux-x86_64-relwithdebinfo for 3b8c78a has started.
2025-06-27 10:49:33 UTC Artifacts will be uploaded here
2025-06-27 10:52:45 UTC ya make is running...
🟡 2025-06-27 11:57:01 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
36738 34019 0 7 2681 31

2025-06-27 12:00:20 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-06-27 12:10:29 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
124 (only retried tests) 96 0 0 2 26

🟢 2025-06-27 12:10:36 UTC Build successful.
🟡 2025-06-27 12:10:54 UTC ydbd size 2.2 GiB changed* by +531.4 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 43e3bd9 merge: 3b8c78a diff diff %
ydbd size 2 383 691 928 Bytes 2 384 236 064 Bytes +531.4 KiB +0.023%
ydbd stripped size 499 055 912 Bytes 499 134 728 Bytes +77.0 KiB +0.016%

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

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

Successfully merging this pull request may close these issues.

1 participant