diff options
author | nsofya <nsofya@ydb.tech> | 2023-10-12 21:03:14 +0300 |
---|---|---|
committer | nsofya <nsofya@ydb.tech> | 2023-10-12 21:22:13 +0300 |
commit | 18e4a43a37ff5de955deed68bbdb98238c591334 (patch) | |
tree | 3462c6b437b2e2c938cc706f6d193b14065febb2 | |
parent | b0e672e2a87c46ac2b724cad5bf01b7a3924dc2a (diff) | |
download | ydb-18e4a43a37ff5de955deed68bbdb98238c591334.tar.gz |
Add TABLE object type
26 files changed, 241 insertions, 26 deletions
diff --git a/.mapping.json b/.mapping.json index 7f672f345c..3cb003223e 100644 --- a/.mapping.json +++ b/.mapping.json @@ -4585,6 +4585,11 @@ "ydb/core/kqp/gateway/behaviour/external_data_source/CMakeLists.linux-x86_64.txt":"", "ydb/core/kqp/gateway/behaviour/external_data_source/CMakeLists.txt":"", "ydb/core/kqp/gateway/behaviour/external_data_source/CMakeLists.windows-x86_64.txt":"", + "ydb/core/kqp/gateway/behaviour/table/CMakeLists.darwin-x86_64.txt":"", + "ydb/core/kqp/gateway/behaviour/table/CMakeLists.linux-aarch64.txt":"", + "ydb/core/kqp/gateway/behaviour/table/CMakeLists.linux-x86_64.txt":"", + "ydb/core/kqp/gateway/behaviour/table/CMakeLists.txt":"", + "ydb/core/kqp/gateway/behaviour/table/CMakeLists.windows-x86_64.txt":"", "ydb/core/kqp/gateway/behaviour/tablestore/CMakeLists.darwin-x86_64.txt":"", "ydb/core/kqp/gateway/behaviour/tablestore/CMakeLists.linux-aarch64.txt":"", "ydb/core/kqp/gateway/behaviour/tablestore/CMakeLists.linux-x86_64.txt":"", diff --git a/ydb/core/kqp/gateway/CMakeLists.darwin-x86_64.txt b/ydb/core/kqp/gateway/CMakeLists.darwin-x86_64.txt index 4fa3bf3548..3857806ebf 100644 --- a/ydb/core/kqp/gateway/CMakeLists.darwin-x86_64.txt +++ b/ydb/core/kqp/gateway/CMakeLists.darwin-x86_64.txt @@ -25,6 +25,7 @@ target_link_libraries(core-kqp-gateway PUBLIC core-kqp-query_data kqp-gateway-actors gateway-behaviour-tablestore + gateway-behaviour-table gateway-behaviour-external_data_source providers-result-expr_nodes ) diff --git a/ydb/core/kqp/gateway/CMakeLists.linux-aarch64.txt b/ydb/core/kqp/gateway/CMakeLists.linux-aarch64.txt index 1796c0956f..0da19513a6 100644 --- a/ydb/core/kqp/gateway/CMakeLists.linux-aarch64.txt +++ b/ydb/core/kqp/gateway/CMakeLists.linux-aarch64.txt @@ -26,6 +26,7 @@ target_link_libraries(core-kqp-gateway PUBLIC core-kqp-query_data kqp-gateway-actors gateway-behaviour-tablestore + gateway-behaviour-table gateway-behaviour-external_data_source providers-result-expr_nodes ) diff --git a/ydb/core/kqp/gateway/CMakeLists.linux-x86_64.txt b/ydb/core/kqp/gateway/CMakeLists.linux-x86_64.txt index 1796c0956f..0da19513a6 100644 --- a/ydb/core/kqp/gateway/CMakeLists.linux-x86_64.txt +++ b/ydb/core/kqp/gateway/CMakeLists.linux-x86_64.txt @@ -26,6 +26,7 @@ target_link_libraries(core-kqp-gateway PUBLIC core-kqp-query_data kqp-gateway-actors gateway-behaviour-tablestore + gateway-behaviour-table gateway-behaviour-external_data_source providers-result-expr_nodes ) diff --git a/ydb/core/kqp/gateway/CMakeLists.windows-x86_64.txt b/ydb/core/kqp/gateway/CMakeLists.windows-x86_64.txt index 4fa3bf3548..3857806ebf 100644 --- a/ydb/core/kqp/gateway/CMakeLists.windows-x86_64.txt +++ b/ydb/core/kqp/gateway/CMakeLists.windows-x86_64.txt @@ -25,6 +25,7 @@ target_link_libraries(core-kqp-gateway PUBLIC core-kqp-query_data kqp-gateway-actors gateway-behaviour-tablestore + gateway-behaviour-table gateway-behaviour-external_data_source providers-result-expr_nodes ) diff --git a/ydb/core/kqp/gateway/behaviour/CMakeLists.txt b/ydb/core/kqp/gateway/behaviour/CMakeLists.txt index 2c9386bf8a..19718f063f 100644 --- a/ydb/core/kqp/gateway/behaviour/CMakeLists.txt +++ b/ydb/core/kqp/gateway/behaviour/CMakeLists.txt @@ -7,4 +7,5 @@ add_subdirectory(external_data_source) +add_subdirectory(table) add_subdirectory(tablestore) diff --git a/ydb/core/kqp/gateway/behaviour/table/CMakeLists.darwin-x86_64.txt b/ydb/core/kqp/gateway/behaviour/table/CMakeLists.darwin-x86_64.txt new file mode 100644 index 0000000000..4dea730fc6 --- /dev/null +++ b/ydb/core/kqp/gateway/behaviour/table/CMakeLists.darwin-x86_64.txt @@ -0,0 +1,28 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + + +add_library(gateway-behaviour-table INTERFACE) +target_link_libraries(gateway-behaviour-table INTERFACE + contrib-libs-cxxsupp + yutil + gateway-behaviour-tablestore +) + +add_global_library_for(gateway-behaviour-table.global gateway-behaviour-table) +target_compile_options(gateway-behaviour-table.global PRIVATE + -DUSE_CURRENT_UDF_ABI_VERSION +) +target_link_libraries(gateway-behaviour-table.global PUBLIC + contrib-libs-cxxsupp + yutil + gateway-behaviour-tablestore +) +target_sources(gateway-behaviour-table.global PRIVATE + ${CMAKE_SOURCE_DIR}/ydb/core/kqp/gateway/behaviour/table/behaviour.cpp +) diff --git a/ydb/core/kqp/gateway/behaviour/table/CMakeLists.linux-aarch64.txt b/ydb/core/kqp/gateway/behaviour/table/CMakeLists.linux-aarch64.txt new file mode 100644 index 0000000000..971e0ca270 --- /dev/null +++ b/ydb/core/kqp/gateway/behaviour/table/CMakeLists.linux-aarch64.txt @@ -0,0 +1,30 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + + +add_library(gateway-behaviour-table INTERFACE) +target_link_libraries(gateway-behaviour-table INTERFACE + contrib-libs-linux-headers + contrib-libs-cxxsupp + yutil + gateway-behaviour-tablestore +) + +add_global_library_for(gateway-behaviour-table.global gateway-behaviour-table) +target_compile_options(gateway-behaviour-table.global PRIVATE + -DUSE_CURRENT_UDF_ABI_VERSION +) +target_link_libraries(gateway-behaviour-table.global PUBLIC + contrib-libs-linux-headers + contrib-libs-cxxsupp + yutil + gateway-behaviour-tablestore +) +target_sources(gateway-behaviour-table.global PRIVATE + ${CMAKE_SOURCE_DIR}/ydb/core/kqp/gateway/behaviour/table/behaviour.cpp +) diff --git a/ydb/core/kqp/gateway/behaviour/table/CMakeLists.linux-x86_64.txt b/ydb/core/kqp/gateway/behaviour/table/CMakeLists.linux-x86_64.txt new file mode 100644 index 0000000000..971e0ca270 --- /dev/null +++ b/ydb/core/kqp/gateway/behaviour/table/CMakeLists.linux-x86_64.txt @@ -0,0 +1,30 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + + +add_library(gateway-behaviour-table INTERFACE) +target_link_libraries(gateway-behaviour-table INTERFACE + contrib-libs-linux-headers + contrib-libs-cxxsupp + yutil + gateway-behaviour-tablestore +) + +add_global_library_for(gateway-behaviour-table.global gateway-behaviour-table) +target_compile_options(gateway-behaviour-table.global PRIVATE + -DUSE_CURRENT_UDF_ABI_VERSION +) +target_link_libraries(gateway-behaviour-table.global PUBLIC + contrib-libs-linux-headers + contrib-libs-cxxsupp + yutil + gateway-behaviour-tablestore +) +target_sources(gateway-behaviour-table.global PRIVATE + ${CMAKE_SOURCE_DIR}/ydb/core/kqp/gateway/behaviour/table/behaviour.cpp +) diff --git a/ydb/core/kqp/gateway/behaviour/table/CMakeLists.txt b/ydb/core/kqp/gateway/behaviour/table/CMakeLists.txt new file mode 100644 index 0000000000..f8b31df0c1 --- /dev/null +++ b/ydb/core/kqp/gateway/behaviour/table/CMakeLists.txt @@ -0,0 +1,17 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + +if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND NOT HAVE_CUDA) + include(CMakeLists.linux-aarch64.txt) +elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + include(CMakeLists.darwin-x86_64.txt) +elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA) + include(CMakeLists.windows-x86_64.txt) +elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT HAVE_CUDA) + include(CMakeLists.linux-x86_64.txt) +endif() diff --git a/ydb/core/kqp/gateway/behaviour/table/CMakeLists.windows-x86_64.txt b/ydb/core/kqp/gateway/behaviour/table/CMakeLists.windows-x86_64.txt new file mode 100644 index 0000000000..4dea730fc6 --- /dev/null +++ b/ydb/core/kqp/gateway/behaviour/table/CMakeLists.windows-x86_64.txt @@ -0,0 +1,28 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + + +add_library(gateway-behaviour-table INTERFACE) +target_link_libraries(gateway-behaviour-table INTERFACE + contrib-libs-cxxsupp + yutil + gateway-behaviour-tablestore +) + +add_global_library_for(gateway-behaviour-table.global gateway-behaviour-table) +target_compile_options(gateway-behaviour-table.global PRIVATE + -DUSE_CURRENT_UDF_ABI_VERSION +) +target_link_libraries(gateway-behaviour-table.global PUBLIC + contrib-libs-cxxsupp + yutil + gateway-behaviour-tablestore +) +target_sources(gateway-behaviour-table.global PRIVATE + ${CMAKE_SOURCE_DIR}/ydb/core/kqp/gateway/behaviour/table/behaviour.cpp +) diff --git a/ydb/core/kqp/gateway/behaviour/table/behaviour.cpp b/ydb/core/kqp/gateway/behaviour/table/behaviour.cpp new file mode 100644 index 0000000000..85c6caeb03 --- /dev/null +++ b/ydb/core/kqp/gateway/behaviour/table/behaviour.cpp @@ -0,0 +1,25 @@ +#include "behaviour.h" +#include <ydb/core/kqp/gateway/behaviour/tablestore/manager.h> + +namespace NKikimr::NKqp { + +TOlapTableBehaviour::TFactory::TRegistrator<TOlapTableBehaviour> TOlapTableBehaviour::Registrator(TOlapTableConfig::GetTypeId()); + +NMetadata::NModifications::IOperationsManager::TPtr TOlapTableBehaviour::ConstructOperationsManager() const { + return std::make_shared<TTableStoreManager>(true); +} + +NMetadata::NInitializer::IInitializationBehaviour::TPtr TOlapTableBehaviour::ConstructInitializer() const { + return nullptr; +} + +TString TOlapTableBehaviour::GetInternalStorageTablePath() const { + return TOlapTableConfig::GetTypeId(); +} + + +TString TOlapTableBehaviour::GetTypeId() const { + return TOlapTableConfig::GetTypeId(); +} + +} diff --git a/ydb/core/kqp/gateway/behaviour/table/behaviour.h b/ydb/core/kqp/gateway/behaviour/table/behaviour.h new file mode 100644 index 0000000000..2ec8f08a8f --- /dev/null +++ b/ydb/core/kqp/gateway/behaviour/table/behaviour.h @@ -0,0 +1,25 @@ +#pragma once +#include <ydb/services/metadata/abstract/kqp_common.h> +#include <ydb/services/metadata/abstract/initialization.h> + +namespace NKikimr::NKqp { + +class TOlapTableConfig { +public: + static TString GetTypeId() { + return "TABLE"; + } +}; + +class TOlapTableBehaviour: public NMetadata::TClassBehaviour<TOlapTableBehaviour> { +private: + static TFactory::TRegistrator<TOlapTableBehaviour> Registrator; +protected: + virtual std::shared_ptr<NMetadata::NInitializer::IInitializationBehaviour> ConstructInitializer() const override; + virtual std::shared_ptr<NMetadata::NModifications::IOperationsManager> ConstructOperationsManager() const override; + + virtual TString GetInternalStorageTablePath() const override; + virtual TString GetTypeId() const override; +}; + +} diff --git a/ydb/core/kqp/gateway/behaviour/table/ya.make b/ydb/core/kqp/gateway/behaviour/table/ya.make new file mode 100644 index 0000000000..e8654ae528 --- /dev/null +++ b/ydb/core/kqp/gateway/behaviour/table/ya.make @@ -0,0 +1,13 @@ +LIBRARY() + +SRCS( + GLOBAL behaviour.cpp +) + +PEERDIR( + ydb/core/kqp/gateway/behaviour/tablestore +) + +YQL_LAST_ABI_VERSION() + +END() diff --git a/ydb/core/kqp/gateway/behaviour/tablestore/behaviour.cpp b/ydb/core/kqp/gateway/behaviour/tablestore/behaviour.cpp index c985b05fbf..43f19e7e45 100644 --- a/ydb/core/kqp/gateway/behaviour/tablestore/behaviour.cpp +++ b/ydb/core/kqp/gateway/behaviour/tablestore/behaviour.cpp @@ -6,7 +6,7 @@ namespace NKikimr::NKqp { TTableStoreBehaviour::TFactory::TRegistrator<TTableStoreBehaviour> TTableStoreBehaviour::Registrator(TTableStoreConfig::GetTypeId()); NMetadata::NModifications::IOperationsManager::TPtr TTableStoreBehaviour::ConstructOperationsManager() const { - return std::make_shared<TTableStoreManager>(); + return std::make_shared<TTableStoreManager>(false); } NMetadata::NInitializer::IInitializationBehaviour::TPtr TTableStoreBehaviour::ConstructInitializer() const { diff --git a/ydb/core/kqp/gateway/behaviour/tablestore/manager.cpp b/ydb/core/kqp/gateway/behaviour/tablestore/manager.cpp index 207e56c4a9..1768938fb3 100644 --- a/ydb/core/kqp/gateway/behaviour/tablestore/manager.cpp +++ b/ydb/core/kqp/gateway/behaviour/tablestore/manager.cpp @@ -51,7 +51,7 @@ NThreading::TFuture<TTableStoreManager::TYqlConclusionStatus> TTableStoreManager ev->Record.SetUserToken(context.GetExternalData().GetUserToken()->GetSerializedToken()); } auto& schemeTx = *ev->Record.MutableTransaction()->MutableModifyScheme(); - operation->SerializeScheme(schemeTx); + operation->SerializeScheme(schemeTx, IsStandalone); auto promiseScheme = NThreading::NewPromise<NKqp::TSchemeOpRequestHandler::TResult>(); actorSystem->Register(new NKqp::TSchemeOpRequestHandler(ev.Release(), promiseScheme, false)); diff --git a/ydb/core/kqp/gateway/behaviour/tablestore/manager.h b/ydb/core/kqp/gateway/behaviour/tablestore/manager.h index 524356adc8..a4361e9337 100644 --- a/ydb/core/kqp/gateway/behaviour/tablestore/manager.h +++ b/ydb/core/kqp/gateway/behaviour/tablestore/manager.h @@ -7,11 +7,15 @@ namespace NKikimr::NKqp { class TTableStoreManager: public NMetadata::NModifications::IOperationsManager { + using TBase = NMetadata::NModifications::IOperationsManager; + bool IsStandalone = false; protected: NThreading::TFuture<TYqlConclusionStatus> DoModify(const NYql::TObjectSettingsImpl& settings, const ui32 nodeId, NMetadata::IClassBehaviour::TPtr manager, TInternalModificationContext& context) const override; public: - using NMetadata::NModifications::IOperationsManager::TYqlConclusionStatus; + TTableStoreManager(bool isStandalone) + : IsStandalone(isStandalone) + {} }; } diff --git a/ydb/core/kqp/gateway/behaviour/tablestore/operations/abstract.cpp b/ydb/core/kqp/gateway/behaviour/tablestore/operations/abstract.cpp index a74ea0c7a5..682c303abd 100644 --- a/ydb/core/kqp/gateway/behaviour/tablestore/operations/abstract.cpp +++ b/ydb/core/kqp/gateway/behaviour/tablestore/operations/abstract.cpp @@ -29,15 +29,22 @@ TConclusionStatus ITableStoreOperation::Deserialize(const NYql::TObjectSettingsI return TConclusionStatus::Success(); } -void ITableStoreOperation::SerializeScheme(NKikimrSchemeOp::TModifyScheme& scheme) const { +void ITableStoreOperation::SerializeScheme(NKikimrSchemeOp::TModifyScheme& scheme, const bool isStandalone) const { scheme.SetWorkingDir(WorkingDir); - scheme.SetOperationType(NKikimrSchemeOp::ESchemeOpAlterColumnStore); - - NKikimrSchemeOp::TAlterColumnStore* alter = scheme.MutableAlterColumnStore(); - alter->SetName(StoreName); - auto schemaPresetObject = alter->AddAlterSchemaPresets(); - schemaPresetObject->SetName(PresetName); - return DoSerializeScheme(*schemaPresetObject); + if (isStandalone) { + scheme.SetOperationType(NKikimrSchemeOp::ESchemeOpAlterColumnTable); + NKikimrSchemeOp::TAlterColumnTable* alter = scheme.MutableAlterColumnTable(); + alter->SetName(StoreName); + auto schemaObject = alter->MutableAlterSchema(); + return DoSerializeScheme(*schemaObject); + } else { + scheme.SetOperationType(NKikimrSchemeOp::ESchemeOpAlterColumnStore); + NKikimrSchemeOp::TAlterColumnStore* alter = scheme.MutableAlterColumnStore(); + alter->SetName(StoreName); + auto schemaPresetObject = alter->AddAlterSchemaPresets(); + schemaPresetObject->SetName(PresetName); + return DoSerializeScheme(*(schemaPresetObject->MutableAlterSchema())); + } } } diff --git a/ydb/core/kqp/gateway/behaviour/tablestore/operations/abstract.h b/ydb/core/kqp/gateway/behaviour/tablestore/operations/abstract.h index a77c5d3b7f..aee052d7a2 100644 --- a/ydb/core/kqp/gateway/behaviour/tablestore/operations/abstract.h +++ b/ydb/core/kqp/gateway/behaviour/tablestore/operations/abstract.h @@ -16,10 +16,10 @@ public: TConclusionStatus Deserialize(const NYql::TObjectSettingsImpl& settings); - void SerializeScheme(NKikimrSchemeOp::TModifyScheme& scheme) const; + void SerializeScheme(NKikimrSchemeOp::TModifyScheme& scheme, const bool isStandalone) const; private: virtual TConclusionStatus DoDeserialize(NYql::TObjectSettingsImpl::TFeaturesExtractor& features) = 0; - virtual void DoSerializeScheme(NKikimrSchemeOp::TAlterColumnTableSchemaPreset& scheme) const = 0; + virtual void DoSerializeScheme(NKikimrSchemeOp::TAlterColumnTableSchema& scheme) const = 0; }; } diff --git a/ydb/core/kqp/gateway/behaviour/tablestore/operations/add_column.cpp b/ydb/core/kqp/gateway/behaviour/tablestore/operations/add_column.cpp index d002c7bbc6..0353207940 100644 --- a/ydb/core/kqp/gateway/behaviour/tablestore/operations/add_column.cpp +++ b/ydb/core/kqp/gateway/behaviour/tablestore/operations/add_column.cpp @@ -27,9 +27,8 @@ TConclusionStatus TAddColumnOperation::DoDeserialize(NYql::TObjectSettingsImpl:: return TConclusionStatus::Success(); } -void TAddColumnOperation::DoSerializeScheme(NKikimrSchemeOp::TAlterColumnTableSchemaPreset& presetProto) const { - auto schemaData = presetProto.MutableAlterSchema(); - auto column = schemaData->AddAddColumns(); +void TAddColumnOperation::DoSerializeScheme(NKikimrSchemeOp::TAlterColumnTableSchema& schemaData) const { + auto column = schemaData.AddAddColumns(); column->SetName(ColumnName); column->SetType(ColumnType); column->SetNotNull(NotNull); diff --git a/ydb/core/kqp/gateway/behaviour/tablestore/operations/add_column.h b/ydb/core/kqp/gateway/behaviour/tablestore/operations/add_column.h index 30405d1a68..6bf452c9f8 100644 --- a/ydb/core/kqp/gateway/behaviour/tablestore/operations/add_column.h +++ b/ydb/core/kqp/gateway/behaviour/tablestore/operations/add_column.h @@ -3,6 +3,7 @@ namespace NKikimr::NKqp { class TAddColumnOperation : public ITableStoreOperation { +private: static TString GetTypeName() { return "NEW_COLUMN"; } @@ -15,7 +16,7 @@ private: public: TConclusionStatus DoDeserialize(NYql::TObjectSettingsImpl::TFeaturesExtractor& features) override; - void DoSerializeScheme(NKikimrSchemeOp::TAlterColumnTableSchemaPreset& presetProto) const override; + void DoSerializeScheme(NKikimrSchemeOp::TAlterColumnTableSchema& schemaData) const override; }; } diff --git a/ydb/core/kqp/gateway/behaviour/tablestore/operations/alter_column.cpp b/ydb/core/kqp/gateway/behaviour/tablestore/operations/alter_column.cpp index 4f4ad041f7..e7706d1093 100644 --- a/ydb/core/kqp/gateway/behaviour/tablestore/operations/alter_column.cpp +++ b/ydb/core/kqp/gateway/behaviour/tablestore/operations/alter_column.cpp @@ -25,9 +25,8 @@ TConclusionStatus TAlterColumnOperation::DoDeserialize(NYql::TObjectSettingsImpl return TConclusionStatus::Success(); } -void TAlterColumnOperation::DoSerializeScheme(NKikimrSchemeOp::TAlterColumnTableSchemaPreset& presetProto) const { - auto schemaData = presetProto.MutableAlterSchema(); - auto* column = schemaData->AddAlterColumns(); +void TAlterColumnOperation::DoSerializeScheme(NKikimrSchemeOp::TAlterColumnTableSchema& schemaData) const { + auto* column = schemaData.AddAlterColumns(); column->SetName(ColumnName); *column->MutableCompression() = CompressionDiff.SerializeToProto(); *column->MutableDictionaryEncoding() = DictionaryEncodingDiff.SerializeToProto(); diff --git a/ydb/core/kqp/gateway/behaviour/tablestore/operations/alter_column.h b/ydb/core/kqp/gateway/behaviour/tablestore/operations/alter_column.h index b0fe850dab..803ffd5464 100644 --- a/ydb/core/kqp/gateway/behaviour/tablestore/operations/alter_column.h +++ b/ydb/core/kqp/gateway/behaviour/tablestore/operations/alter_column.h @@ -19,7 +19,7 @@ private: public: TConclusionStatus DoDeserialize(NYql::TObjectSettingsImpl::TFeaturesExtractor& features) override; - void DoSerializeScheme(NKikimrSchemeOp::TAlterColumnTableSchemaPreset& presetProto) const override; + void DoSerializeScheme(NKikimrSchemeOp::TAlterColumnTableSchema& schemaData) const override; }; } diff --git a/ydb/core/kqp/gateway/behaviour/tablestore/operations/drop_column.cpp b/ydb/core/kqp/gateway/behaviour/tablestore/operations/drop_column.cpp index 6267cb9dc5..36340752ab 100644 --- a/ydb/core/kqp/gateway/behaviour/tablestore/operations/drop_column.cpp +++ b/ydb/core/kqp/gateway/behaviour/tablestore/operations/drop_column.cpp @@ -14,9 +14,8 @@ TConclusionStatus TDropColumnOperation::DoDeserialize(NYql::TObjectSettingsImpl: return TConclusionStatus::Success(); } -void TDropColumnOperation::DoSerializeScheme(NKikimrSchemeOp::TAlterColumnTableSchemaPreset& presetProto) const { - auto schemaData = presetProto.MutableAlterSchema(); - auto column = schemaData->AddDropColumns(); +void TDropColumnOperation::DoSerializeScheme(NKikimrSchemeOp::TAlterColumnTableSchema& schemaData) const { + auto column = schemaData.AddDropColumns(); column->SetName(ColumnName); } diff --git a/ydb/core/kqp/gateway/behaviour/tablestore/operations/drop_column.h b/ydb/core/kqp/gateway/behaviour/tablestore/operations/drop_column.h index 1353ef5f5a..f47f113291 100644 --- a/ydb/core/kqp/gateway/behaviour/tablestore/operations/drop_column.h +++ b/ydb/core/kqp/gateway/behaviour/tablestore/operations/drop_column.h @@ -12,8 +12,7 @@ private: TString ColumnName; public: TConclusionStatus DoDeserialize(NYql::TObjectSettingsImpl::TFeaturesExtractor& features) override; - - void DoSerializeScheme(NKikimrSchemeOp::TAlterColumnTableSchemaPreset& presetProto) const override; + void DoSerializeScheme(NKikimrSchemeOp::TAlterColumnTableSchema& schemaData) const override; }; } diff --git a/ydb/core/kqp/gateway/ya.make b/ydb/core/kqp/gateway/ya.make index ad479b21a9..7b8eb36c59 100644 --- a/ydb/core/kqp/gateway/ya.make +++ b/ydb/core/kqp/gateway/ya.make @@ -15,6 +15,7 @@ PEERDIR( ydb/core/kqp/query_data ydb/core/kqp/gateway/actors ydb/core/kqp/gateway/behaviour/tablestore + ydb/core/kqp/gateway/behaviour/table ydb/core/kqp/gateway/behaviour/external_data_source ydb/library/yql/providers/result/expr_nodes ) |