From b3ea93c2ec01ee8b6d45a449cff96943e7677404 Mon Sep 17 00:00:00 2001 From: vlad-gogov Date: Wed, 11 Sep 2024 14:08:54 +0300 Subject: [PATCH] added test with disabled feature flag "EnableOlapCompression" --- ydb/core/kqp/ut/common/kqp_ut_common.cpp | 5 ++++- ydb/core/kqp/ut/olap/sys_view_ut.cpp | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ydb/core/kqp/ut/common/kqp_ut_common.cpp b/ydb/core/kqp/ut/common/kqp_ut_common.cpp index a6a965850e56..1d11334e8811 100644 --- a/ydb/core/kqp/ut/common/kqp_ut_common.cpp +++ b/ydb/core/kqp/ut/common/kqp_ut_common.cpp @@ -133,9 +133,12 @@ TKikimrRunner::TKikimrRunner(const TKikimrSettings& settings) { ServerSettings->SetUseRealThreads(settings.UseRealThreads); ServerSettings->SetEnableTablePgTypes(true); ServerSettings->SetEnablePgSyntax(true); - ServerSettings->SetEnableOlapCompression(true); ServerSettings->S3ActorsFactory = settings.S3ActorsFactory; + if (!settings.FeatureFlags.HasEnableOlapCompression()) { + ServerSettings->SetEnableOlapCompression(true); + } + if (settings.Storage) { ServerSettings->SetCustomDiskParams(*settings.Storage); ServerSettings->SetEnableMockOnSingleNode(false); diff --git a/ydb/core/kqp/ut/olap/sys_view_ut.cpp b/ydb/core/kqp/ut/olap/sys_view_ut.cpp index 27820452542e..581384ba4450 100644 --- a/ydb/core/kqp/ut/olap/sys_view_ut.cpp +++ b/ydb/core/kqp/ut/olap/sys_view_ut.cpp @@ -219,6 +219,17 @@ Y_UNIT_TEST_SUITE(KqpOlapSysView) { } } + Y_UNIT_TEST(DisabledAlterCompression) { + TKikimrSettings settings = TKikimrSettings().SetWithSampleTables(false).SetEnableOlapCompression(false); + TKikimrRunner kikimr(settings); + TTypedLocalHelper helper("", kikimr, "olapTable", "olapStore"); + helper.CreateTestOlapTable(); + helper.FillPKOnly(0, 1); + helper.ExecuteSchemeQuery( + "ALTER OBJECT `/Root/olapStore` (TYPE TABLESTORE) SET (ACTION=ALTER_COLUMN, NAME=pk_int, " + "`SERIALIZER.CLASS_NAME`=`ARROW_SERIALIZER`, `COMPRESSION.TYPE`=`zstd`);", NYdb::EStatus::PRECONDITION_FAILED); + } + Y_UNIT_TEST(StatsSysViewBytesColumnActualization) { ui64 rawBytes1; ui64 bytes1;