diff --git a/ydb/core/kqp/gateway/behaviour/tablestore/manager.cpp b/ydb/core/kqp/gateway/behaviour/tablestore/manager.cpp index 844ef19344db..a221a60ffd70 100644 --- a/ydb/core/kqp/gateway/behaviour/tablestore/manager.cpp +++ b/ydb/core/kqp/gateway/behaviour/tablestore/manager.cpp @@ -31,6 +31,9 @@ NThreading::TFuture TTableStoreManager return NThreading::MakeFuture(TYqlConclusionStatus::Fail("not implemented")); case EActivityType::Alter: try { + if (!AppData()->ColumnShardConfig.GetAlterObjectEnabled()) { + return NThreading::MakeFuture(TYqlConclusionStatus::Fail("ALTER OBJECT is disabled for column tables")); + } auto actionName = settings.GetFeaturesExtractor().Extract("ACTION"); if (!actionName) { return NThreading::MakeFuture(TYqlConclusionStatus::Fail("can't find ACTION parameter")); diff --git a/ydb/core/kqp/ut/common/kqp_ut_common.h b/ydb/core/kqp/ut/common/kqp_ut_common.h index 5e392069872a..1a7bd65c5a9d 100644 --- a/ydb/core/kqp/ut/common/kqp_ut_common.h +++ b/ydb/core/kqp/ut/common/kqp_ut_common.h @@ -121,6 +121,10 @@ struct TKikimrSettings: public TTestFeatureFlagsHolder { TKikimrSettings& SetUseRealThreads(bool value) { UseRealThreads = value; return *this; }; TKikimrSettings& SetEnableForceFollowers(bool value) { EnableForceFollowers = value; return *this; }; TKikimrSettings& SetS3ActorsFactory(std::shared_ptr value) { S3ActorsFactory = std::move(value); return *this; }; + TKikimrSettings& SetColumnShardAlterObjectEnabled(bool enable) { + AppConfig.MutableColumnShardConfig()->SetAlterObjectEnabled(enable); + return *this; + } }; class TKikimrRunner { diff --git a/ydb/core/kqp/ut/olap/aggregations_ut.cpp b/ydb/core/kqp/ut/olap/aggregations_ut.cpp index 5a851b3ab6b7..01f7b8e2a64e 100644 --- a/ydb/core/kqp/ut/olap/aggregations_ut.cpp +++ b/ydb/core/kqp/ut/olap/aggregations_ut.cpp @@ -14,6 +14,7 @@ namespace NKikimr::NKqp { Y_UNIT_TEST_SUITE(KqpOlapAggregations) { Y_UNIT_TEST(Aggregation) { auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) .SetWithSampleTables(false); TKikimrRunner kikimr(settings); diff --git a/ydb/core/kqp/ut/olap/blobs_sharing_ut.cpp b/ydb/core/kqp/ut/olap/blobs_sharing_ut.cpp index 4db334e774fa..da3a403f19b8 100644 --- a/ydb/core/kqp/ut/olap/blobs_sharing_ut.cpp +++ b/ydb/core/kqp/ut/olap/blobs_sharing_ut.cpp @@ -71,7 +71,10 @@ Y_UNIT_TEST_SUITE(KqpOlapBlobsSharing) { TKikimrSettings GetKikimrSettings() { NKikimrConfig::TFeatureFlags featureFlags; featureFlags.SetEnableAlterShardingInColumnShard(true); - return TKikimrSettings().SetWithSampleTables(false).SetFeatureFlags(featureFlags); + return TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false) + .SetFeatureFlags(featureFlags); } class TSharingDataTestCase { diff --git a/ydb/core/kqp/ut/olap/compression_ut.cpp b/ydb/core/kqp/ut/olap/compression_ut.cpp index b325324a1f3d..4b4ed13264cf 100644 --- a/ydb/core/kqp/ut/olap/compression_ut.cpp +++ b/ydb/core/kqp/ut/olap/compression_ut.cpp @@ -4,7 +4,10 @@ namespace NKikimr::NKqp { Y_UNIT_TEST_SUITE(KqpOlapCompression) { Y_UNIT_TEST(DisabledAlterCompression) { - TKikimrSettings settings = TKikimrSettings().SetWithSampleTables(false).SetEnableOlapCompression(false); + auto settings = TKikimrSettings() + .SetEnableOlapCompression(false) + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TTestHelper testHelper(settings); TVector schema = { TTestHelper::TColumnSchema().SetName("pk_int").SetType(NScheme::NTypeIds::Uint64).SetNullable(false) @@ -28,7 +31,9 @@ Y_UNIT_TEST_SUITE(KqpOlapCompression) { } Y_UNIT_TEST(OffCompression) { - TKikimrSettings settings = TKikimrSettings().SetWithSampleTables(false); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TTestHelper testHelper(settings); TVector schema = { TTestHelper::TColumnSchema().SetName("pk_int").SetType(NScheme::NTypeIds::Uint64).SetNullable(false) @@ -47,7 +52,9 @@ Y_UNIT_TEST_SUITE(KqpOlapCompression) { } Y_UNIT_TEST(TestAlterCompressionTableInTableStore) { - TKikimrSettings settings = TKikimrSettings().SetWithSampleTables(false); + TKikimrSettings settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TTestHelper testHelper(settings); TVector schema = { TTestHelper::TColumnSchema().SetName("pk_int").SetType(NScheme::NTypeIds::Uint64).SetNullable(false) diff --git a/ydb/core/kqp/ut/olap/indexes_ut.cpp b/ydb/core/kqp/ut/olap/indexes_ut.cpp index f86d7f7fc9bd..3961863dc89f 100644 --- a/ydb/core/kqp/ut/olap/indexes_ut.cpp +++ b/ydb/core/kqp/ut/olap/indexes_ut.cpp @@ -15,7 +15,9 @@ namespace NKikimr::NKqp { Y_UNIT_TEST_SUITE(KqpOlapIndexes) { Y_UNIT_TEST(IndexesActualization) { - auto settings = TKikimrSettings().SetWithSampleTables(false); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(settings); auto csController = NYDBTest::TControllers::RegisterCSControllerGuard(); @@ -96,7 +98,9 @@ Y_UNIT_TEST_SUITE(KqpOlapIndexes) { } Y_UNIT_TEST(CountMinSketchIndex) { - auto settings = TKikimrSettings().SetWithSampleTables(false); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(settings); auto csController = NYDBTest::TControllers::RegisterCSControllerGuard(); @@ -239,7 +243,9 @@ Y_UNIT_TEST_SUITE(KqpOlapIndexes) { } Y_UNIT_TEST(SchemeActualizationOnceOnStart) { - auto settings = TKikimrSettings().SetWithSampleTables(false); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(settings); auto csController = NYDBTest::TControllers::RegisterCSControllerGuard(); @@ -338,7 +344,9 @@ Y_UNIT_TEST_SUITE(KqpOlapIndexes) { public: TTestIndexesScenario& Initialize() { - Settings = TKikimrSettings().SetWithSampleTables(false); + Settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); Settings.AppConfig.MutableColumnShardConfig()->SetReaderClassName("SIMPLE"); Kikimr = std::make_unique(Settings); return *this; @@ -552,7 +560,9 @@ Y_UNIT_TEST_SUITE(KqpOlapIndexes) { } Y_UNIT_TEST(IndexesModificationError) { - auto settings = TKikimrSettings().SetWithSampleTables(false); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(settings); TLocalHelper(kikimr).CreateTestOlapTable(); diff --git a/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp b/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp index 34b9daa241de..58bf88da603c 100644 --- a/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp +++ b/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp @@ -218,6 +218,22 @@ Y_UNIT_TEST_SUITE(KqpOlap) { }; } + Y_UNIT_TEST(AlterObjectDisabled) { + auto settings = TKikimrSettings() + .SetWithSampleTables(false); + TKikimrRunner kikimr(settings); + TLocalHelper(kikimr).CreateTestOlapTableWithoutStore(); + + auto tableClient = kikimr.GetTableClient(); + auto session = tableClient.CreateSession().GetValueSync().GetSession(); + auto alterResult = session.ExecuteSchemeQuery( + "ALTER OBJECT `/Root/olapTable` (TYPE TABLE) SET (ACTION=ALTER_COLUMN, NAME=message, `SERIALIZER.CLASS_NAME`=`ARROW_SERIALIZER`, `COMPRESSION.TYPE`=`zstd`, `COMPRESSION.LEVEL`=`4`)" + ).GetValueSync(); + UNIT_ASSERT_VALUES_EQUAL(alterResult.GetStatus(), NYdb::EStatus::GENERIC_ERROR); + UNIT_ASSERT_STRING_CONTAINS_C(alterResult.GetIssues().ToString(), "Error: ALTER OBJECT is disabled for column tables", alterResult.GetIssues().ToString()); + + } + Y_UNIT_TEST(SimpleQueryOlap) { auto settings = TKikimrSettings() .SetWithSampleTables(false); @@ -2640,7 +2656,9 @@ Y_UNIT_TEST_SUITE(KqpOlap) { } Y_UNIT_TEST(CompactionPlanner) { - auto settings = TKikimrSettings().SetWithSampleTables(false); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(settings); TLocalHelper(kikimr).CreateTestOlapTable(); @@ -2724,7 +2742,9 @@ Y_UNIT_TEST_SUITE(KqpOlap) { } Y_UNIT_TEST(MetadataMemoryManager) { - auto settings = TKikimrSettings().SetWithSampleTables(false); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(settings); TLocalHelper(kikimr).CreateTestOlapTable(); @@ -2781,7 +2801,9 @@ Y_UNIT_TEST_SUITE(KqpOlap) { } Y_UNIT_TEST(NormalizeAbsentColumn) { - auto settings = TKikimrSettings().SetWithSampleTables(false); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(settings); TLocalHelper testHelper(kikimr); diff --git a/ydb/core/kqp/ut/olap/sparsed_ut.cpp b/ydb/core/kqp/ut/olap/sparsed_ut.cpp index 76ec86c974ff..147856f2d1e2 100644 --- a/ydb/core/kqp/ut/olap/sparsed_ut.cpp +++ b/ydb/core/kqp/ut/olap/sparsed_ut.cpp @@ -16,7 +16,9 @@ Y_UNIT_TEST_SUITE(KqpOlapSparsed) { class TSparsedDataTest { private: - const TKikimrSettings Settings = TKikimrSettings().SetWithSampleTables(false); + const TKikimrSettings Settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner Kikimr; NKikimr::NYDBTest::TControllers::TGuard CSController; const TString StoreName; @@ -304,7 +306,9 @@ Y_UNIT_TEST_SUITE(KqpOlapSparsed) { } Y_UNIT_TEST(AccessorActualization) { - auto settings = TKikimrSettings().SetWithSampleTables(false); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(settings); auto csController = NYDBTest::TControllers::RegisterCSControllerGuard(); diff --git a/ydb/core/kqp/ut/olap/statistics_ut.cpp b/ydb/core/kqp/ut/olap/statistics_ut.cpp index 094fefbd4028..3000e243b9ea 100644 --- a/ydb/core/kqp/ut/olap/statistics_ut.cpp +++ b/ydb/core/kqp/ut/olap/statistics_ut.cpp @@ -8,7 +8,9 @@ Y_UNIT_TEST_SUITE(KqpOlapStatistics) { Y_UNIT_TEST(StatsUsage) { auto csController = NYDBTest::TControllers::RegisterCSControllerGuard(); { - auto settings = TKikimrSettings().SetWithSampleTables(false); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(settings); Tests::NCommon::TLoggerInit(kikimr).Initialize(); TTypedLocalHelper helper("Utf8", kikimr); @@ -49,7 +51,9 @@ Y_UNIT_TEST_SUITE(KqpOlapStatistics) { Y_UNIT_TEST(StatsUsageNotPK) { auto csController = NYDBTest::TControllers::RegisterCSControllerGuard(); { - auto settings = TKikimrSettings().SetWithSampleTables(false); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(settings); Tests::NCommon::TLoggerInit(kikimr).Initialize(); TTypedLocalHelper helper("Utf8", kikimr); @@ -87,7 +91,9 @@ Y_UNIT_TEST_SUITE(KqpOlapStatistics) { Y_UNIT_TEST(StatsUsageWithTTL) { auto csController = NYDBTest::TControllers::RegisterCSControllerGuard(); { - auto settings = TKikimrSettings().SetWithSampleTables(false); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(settings); Tests::NCommon::TLoggerInit(kikimr).Initialize(); TTypedLocalHelper helper("Utf8", kikimr); diff --git a/ydb/core/kqp/ut/olap/sys_view_ut.cpp b/ydb/core/kqp/ut/olap/sys_view_ut.cpp index 9d12b54efab6..c0c362a66635 100644 --- a/ydb/core/kqp/ut/olap/sys_view_ut.cpp +++ b/ydb/core/kqp/ut/olap/sys_view_ut.cpp @@ -117,6 +117,7 @@ Y_UNIT_TEST_SUITE(KqpOlapSysView) { auto csController = NYDBTest::TControllers::RegisterCSControllerGuard(); csController->SetOverrideBlobSplitSettings(NOlap::NSplitter::TSplitSettings()); auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) .SetWithSampleTables(false); TKikimrRunner kikimr(settings); Tests::NCommon::TLoggerInit(kikimr).Initialize(); @@ -137,6 +138,7 @@ Y_UNIT_TEST_SUITE(KqpOlapSysView) { const ui32 groupsCount = 512; { auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) .SetWithSampleTables(false); TKikimrRunner kikimr(settings); Tests::NCommon::TLoggerInit(kikimr).Initialize(); @@ -192,6 +194,7 @@ Y_UNIT_TEST_SUITE(KqpOlapSysView) { ui64 bytesPK1; auto csController = NYDBTest::TControllers::RegisterCSControllerGuard(); auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) .SetWithSampleTables(false); TKikimrRunner kikimr(settings); Tests::NCommon::TLoggerInit(kikimr).Initialize(); @@ -228,7 +231,9 @@ Y_UNIT_TEST_SUITE(KqpOlapSysView) { ui64 rawBytes1; ui64 bytes1; auto csController = NYDBTest::TControllers::RegisterCSControllerGuard(); - auto settings = TKikimrSettings().SetWithSampleTables(false); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(settings); Tests::NCommon::TLoggerInit(kikimr).Initialize(); TTypedLocalHelper helper("Utf8", kikimr); @@ -260,6 +265,7 @@ Y_UNIT_TEST_SUITE(KqpOlapSysView) { ui64 bytes1; auto csController = NYDBTest::TControllers::RegisterCSControllerGuard(); auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) .SetWithSampleTables(false); TKikimrRunner kikimr(settings); Tests::NCommon::TLoggerInit(kikimr).Initialize(); @@ -298,7 +304,9 @@ Y_UNIT_TEST_SUITE(KqpOlapSysView) { ui64 bytes1; auto csController = NYDBTest::TControllers::RegisterCSControllerGuard(); csController->SetSmallSizeDetector(Max()); - auto settings = TKikimrSettings().SetWithSampleTables(false); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(settings); Tests::NCommon::TLoggerInit(kikimr).Initialize(); TTypedLocalHelper helper("Utf8", kikimr); diff --git a/ydb/core/kqp/ut/olap/tiering_ut.cpp b/ydb/core/kqp/ut/olap/tiering_ut.cpp index 40b4c549542d..8da5e42540dd 100644 --- a/ydb/core/kqp/ut/olap/tiering_ut.cpp +++ b/ydb/core/kqp/ut/olap/tiering_ut.cpp @@ -27,10 +27,10 @@ class TTestEvictionBase { void RunTest() { auto csController = NYDBTest::TControllers::RegisterCSControllerGuard(); csController->SetSkipSpecialCheckForEvict(true); - - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; - TestHelper.emplace(runnerSettings); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); + TestHelper.emplace(settings); TLocalHelper localHelper(TestHelper->GetKikimr()); // TestHelper->GetRuntime().SetLogPriority(NKikimrServices::FLAT_TX_SCHEMESHARD, NActors::NLog::PRI_DEBUG); // TestHelper->GetRuntime().SetLogPriority(NKikimrServices::TX_COLUMNSHARD, NActors::NLog::PRI_DEBUG); diff --git a/ydb/core/kqp/ut/olap/write_ut.cpp b/ydb/core/kqp/ut/olap/write_ut.cpp index 56b54a0dc6eb..5febb351814c 100644 --- a/ydb/core/kqp/ut/olap/write_ut.cpp +++ b/ydb/core/kqp/ut/olap/write_ut.cpp @@ -172,7 +172,9 @@ Y_UNIT_TEST_SUITE(KqpOlapWrite) { } Y_UNIT_TEST(DefaultValues) { - auto settings = TKikimrSettings().SetWithSampleTables(false); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(settings); Tests::NCommon::TLoggerInit(kikimr).Initialize(); TTypedLocalHelper helper("Utf8", kikimr); diff --git a/ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp b/ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp index 91c9356b8df2..1583fbbccb6f 100644 --- a/ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp +++ b/ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp @@ -5518,8 +5518,9 @@ Y_UNIT_TEST_SUITE(KqpScheme) { } Y_UNIT_TEST(AlterColumnTableTtl) { - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; + auto runnerSettings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(runnerSettings); auto db = kikimr.GetTableClient(); auto session = db.CreateSession().GetValueSync().GetSession(); @@ -9222,9 +9223,10 @@ Y_UNIT_TEST_SUITE(KqpOlapScheme) { } Y_UNIT_TEST(AddColumnWithTtl) { - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; - TTestHelper testHelper(runnerSettings); + auto settings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); + TTestHelper testHelper(settings); TVector schema = { TTestHelper::TColumnSchema().SetName("id").SetType(NScheme::NTypeIds::Int32).SetNullable(false), @@ -9484,8 +9486,9 @@ Y_UNIT_TEST_SUITE(KqpOlapScheme) { } */ Y_UNIT_TEST(AddColumnWithStore) { - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; + auto runnerSettings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TTestHelper testHelper(runnerSettings); TVector schema = { @@ -9548,8 +9551,9 @@ Y_UNIT_TEST_SUITE(KqpOlapScheme) { } Y_UNIT_TEST(AddPgColumnWithStore) { - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; + auto runnerSettings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TTestHelper testHelper(runnerSettings); TVector schema = { @@ -9890,8 +9894,9 @@ Y_UNIT_TEST_SUITE(KqpOlapScheme) { } Y_UNIT_TEST(DropTtlColumn) { - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; + auto runnerSettings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TTestHelper testHelper(runnerSettings); TVector schema = { @@ -9955,8 +9960,9 @@ Y_UNIT_TEST_SUITE(KqpOlapScheme) { } Y_UNIT_TEST(DropColumnTableStoreErrors) { - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; + auto runnerSettings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TTestHelper testHelper(runnerSettings); TVector schema = { @@ -11406,8 +11412,9 @@ Y_UNIT_TEST_SUITE(KqpOlapScheme) { } Y_UNIT_TEST(DropColumnAndResetTtl) { - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; + auto runnerSettings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TTestHelper testHelper(runnerSettings); TVector schema = { @@ -11442,8 +11449,9 @@ Y_UNIT_TEST_SUITE(KqpOlapScheme) { } Y_UNIT_TEST(InitTtlSettingsOnShardStart) { - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; + auto runnerSettings = TKikimrSettings() + .SetColumnShardAlterObjectEnabled(true) + .SetWithSampleTables(false); TTestHelper testHelper(runnerSettings); TVector schema = { diff --git a/ydb/core/protos/config.proto b/ydb/core/protos/config.proto index 0177bb18d762..8dc434773369 100644 --- a/ydb/core/protos/config.proto +++ b/ydb/core/protos/config.proto @@ -1810,6 +1810,7 @@ message TColumnShardConfig { optional NKikimrSchemeOp.EColumnCodec DefaultCompression = 36; optional int32 DefaultCompressionLevel = 37; optional uint64 MemoryLimitMergeOnCompactionRawData = 38 [default = 512000000]; + optional bool AlterObjectEnabled = 39 [default = false]; } message TSchemeShardConfig { diff --git a/ydb/core/statistics/ut_common/ut_common.cpp b/ydb/core/statistics/ut_common/ut_common.cpp index 667b522f85f2..d7c580f5fa41 100644 --- a/ydb/core/statistics/ut_common/ut_common.cpp +++ b/ydb/core/statistics/ut_common/ut_common.cpp @@ -36,6 +36,7 @@ TTestEnv::TTestEnv(ui32 staticNodes, ui32 dynamicNodes, bool useRealThreads) Settings->SetUseRealThreads(useRealThreads); Settings->AddStoragePoolType("hdd1"); Settings->AddStoragePoolType("hdd2"); + Settings->SetColumnShardAlterObjectEnabled(true); NKikimrConfig::TFeatureFlags featureFlags; featureFlags.SetEnableStatistics(true); diff --git a/ydb/core/testlib/test_client.h b/ydb/core/testlib/test_client.h index 142bfc3d52bb..a145e7fe4989 100644 --- a/ydb/core/testlib/test_client.h +++ b/ydb/core/testlib/test_client.h @@ -248,6 +248,10 @@ namespace Tests { return *this; } + TServerSettings& SetColumnShardAlterObjectEnabled(bool enable) { + AppConfig->MutableColumnShardConfig()->SetAlterObjectEnabled(enable); + return *this; + } // Add additional grpc services template diff --git a/ydb/tests/olap/scenario/conftest.py b/ydb/tests/olap/scenario/conftest.py index 797335b750ef..057931a7f6fa 100644 --- a/ydb/tests/olap/scenario/conftest.py +++ b/ydb/tests/olap/scenario/conftest.py @@ -31,7 +31,11 @@ def __init__(self, endpoint, database): self._database = database self._mon_port = 8765 else: - config = KikimrConfigGenerator() + config = KikimrConfigGenerator( + column_shard_config={ + 'alter_object_enabled': True, + } + ) cluster = KiKiMR(configurator=config) cluster.start() node = cluster.nodes[1]