Skip to content

Commit

Permalink
Added test with disabled feature flag "EnableOlapCompression" (#9077)
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-gogov authored Sep 11, 2024
1 parent c559bb3 commit 99bd033
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ydb/core/kqp/ut/common/kqp_ut_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
11 changes: 11 additions & 0 deletions ydb/core/kqp/ut/olap/sys_view_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 99bd033

Please sign in to comment.