-
Notifications
You must be signed in to change notification settings - Fork 727
YQ-4857 forbidden change of external data source type if it has dependencies #28183
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
base: main
Are you sure you want to change the base?
Conversation
|
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
There was a problem hiding this 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 pull request refactors the external data source creation and alteration logic, and adds validation to prevent changing the source type when the data source is in use. The main changes include:
- Refactored
CreateExternalDataSourceto use modern C++ patterns (MakeIntrusiveinstead ofnew, direct assignment instead ofCopyFrom) - Added validation to prevent changing external data source type when it's referenced by other entities
- Improved code formatting and namespace organization
- Added comprehensive test coverage for the new validation logic
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| ydb/core/tx/schemeshard/schemeshard__operation_common_external_data_source.cpp | Refactored CreateExternalDataSource function to use MakeIntrusive and direct assignment for protobuf fields |
| ydb/core/tx/schemeshard/schemeshard__operation_alter_external_data_source.cpp | Added validation to prevent source type changes when data source is in use; improved code formatting and namespace organization |
| ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp | Added tests for source type change validation and CREATE OR REPLACE functionality |
| ydb/core/kqp/gateway/kqp_metadata_loader.cpp | Added type mismatch validation between external table and data source; improved code comments |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ydb/core/tx/schemeshard/schemeshard__operation_alter_external_data_source.cpp
Show resolved
Hide resolved
|
🟢 |
|
⚪ ⚪ Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
Changelog entry
Forbidden change of external data source type if it has dependencies
Changelog category
Description for reviewers
Bugfix ticket: https://st.yandex-team.ru/YQ-4857