diff --git a/ydb/core/kqp/ut/common/kqp_ut_common.h b/ydb/core/kqp/ut/common/kqp_ut_common.h index 5e392069872a..fc7a03be1e45 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& SetAlterObjectEnabledForColumnTables(bool enable) { + AppConfig.MutableColumnShardConfig()->SetAlterObjectEnabled(enable); + return *this; + } }; class TKikimrRunner { diff --git a/ydb/core/kqp/ut/olap/compression_ut.cpp b/ydb/core/kqp/ut/olap/compression_ut.cpp index 0cc130a21f10..45bf5807bd8b 100644 --- a/ydb/core/kqp/ut/olap/compression_ut.cpp +++ b/ydb/core/kqp/ut/olap/compression_ut.cpp @@ -6,10 +6,17 @@ Y_UNIT_TEST_SUITE(KqpOlapCompression) { TKikimrSettings GetSettings(bool enableCompression, bool enableAlterObject) { NKikimrConfig::TAppConfig appConfig; appConfig.MutableColumnShardConfig()->SetAlterObjectEnabled(enableAlterObject); - return TKikimrSettings().SetWithSampleTables(false).SetEnableOlapCompression(enableCompression).SetAppConfig(appConfig); + return TKikimrSettings() + .SetWithSampleTables(false) + .SetEnableOlapCompression(enableCompression) + .SetAlterObjectEnabledForColumnTables(enableAlterObject); } Y_UNIT_TEST(DisabledAlterCompression) { - TTestHelper testHelper(GetSettings(true, true)); + auto settings = TKikimrSettings() + .SetEnableOlapCompression(false) + .SetAlterObjectEnabledForColumnTables(true) + .SetWithSampleTables(false); + TTestHelper testHelper(settings); TVector schema = { TTestHelper::TColumnSchema().SetName("pk_int").SetType(NScheme::NTypeIds::Uint64).SetNullable(false) }; @@ -32,7 +39,10 @@ Y_UNIT_TEST_SUITE(KqpOlapCompression) { } Y_UNIT_TEST(OffCompression) { - TTestHelper testHelper(GetSettings(false, true)); + auto settings = TKikimrSettings() + .SetAlterObjectEnabledForColumnTables(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/scheme/kqp_scheme_ut.cpp b/ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp index 77a8743ccecf..fa55635d761d 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{} + .SetAlterObjectEnabledForColumnTables(true) + .SetWithSampleTables(false); TKikimrRunner kikimr(runnerSettings); auto db = kikimr.GetTableClient(); auto session = db.CreateSession().GetValueSync().GetSession(); @@ -9225,9 +9226,10 @@ Y_UNIT_TEST_SUITE(KqpOlapScheme) { NKikimrConfig::TAppConfig appConfig; appConfig.MutableColumnShardConfig()->SetAlterObjectEnabled(true); - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; - TTestHelper testHelper(runnerSettings); + auto settings = TKikimrSettings() + .SetAppConfig(appConfig) + .SetWithSampleTables(false); + TTestHelper testHelper(settings); TVector schema = { TTestHelper::TColumnSchema().SetName("id").SetType(NScheme::NTypeIds::Int32).SetNullable(false), @@ -9487,8 +9489,9 @@ Y_UNIT_TEST_SUITE(KqpOlapScheme) { } */ Y_UNIT_TEST(AddColumnWithStore) { - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; + auto runnerSettings = TKikimrSettings{} + .SetAlterObjectEnabledForColumnTables(true) + .SetWithSampleTables(false); TTestHelper testHelper(runnerSettings); TVector schema = { @@ -9551,8 +9554,9 @@ Y_UNIT_TEST_SUITE(KqpOlapScheme) { } Y_UNIT_TEST(AddPgColumnWithStore) { - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; + auto runnerSettings = TKikimrSettings{} + .SetAlterObjectEnabledForColumnTables(true) + .SetWithSampleTables(false); TTestHelper testHelper(runnerSettings); TVector schema = { @@ -9893,8 +9897,9 @@ Y_UNIT_TEST_SUITE(KqpOlapScheme) { } Y_UNIT_TEST(DropTtlColumn) { - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; + auto runnerSettings = TKikimrSettings{} + .SetAlterObjectEnabledForColumnTables(true) + .SetWithSampleTables(false); TTestHelper testHelper(runnerSettings); TVector schema = { @@ -9958,8 +9963,9 @@ Y_UNIT_TEST_SUITE(KqpOlapScheme) { } Y_UNIT_TEST(DropColumnTableStoreErrors) { - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; + auto runnerSettings = TKikimrSettings{} + .SetAlterObjectEnabledForColumnTables(true) + .SetWithSampleTables(false); TTestHelper testHelper(runnerSettings); TVector schema = { @@ -11409,8 +11415,9 @@ Y_UNIT_TEST_SUITE(KqpOlapScheme) { } Y_UNIT_TEST(DropColumnAndResetTtl) { - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; + auto runnerSettings = TKikimrSettings{} + .SetAlterObjectEnabledForColumnTables(true) + .SetWithSampleTables(false); TTestHelper testHelper(runnerSettings); TVector schema = { @@ -11445,8 +11452,9 @@ Y_UNIT_TEST_SUITE(KqpOlapScheme) { } Y_UNIT_TEST(InitTtlSettingsOnShardStart) { - TKikimrSettings runnerSettings; - runnerSettings.WithSampleTables = false; + auto runnerSettings = TKikimrSettings{} + .SetAlterObjectEnabledForColumnTables(true) + .SetWithSampleTables(false); TTestHelper testHelper(runnerSettings); TVector schema = {