Skip to content

Commit

Permalink
Added test: Alter compression for ColumnTable in TableStore (#9781)
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-gogov authored Sep 26, 2024
1 parent 6bec40a commit 48dc88f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ydb/core/kqp/ut/olap/compression_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,23 @@ Y_UNIT_TEST_SUITE(KqpOlapCompression) {
testHelper.CreateTable(testTableStore);
testHelper.SetCompression(testTableStore, "pk_int", compression);
}

Y_UNIT_TEST(TestAlterCompressionTableInTableStore) {
TKikimrSettings settings = TKikimrSettings().SetWithSampleTables(false);
TTestHelper testHelper(settings);
TVector<TTestHelper::TColumnSchema> schema = {
TTestHelper::TColumnSchema().SetName("pk_int").SetType(NScheme::NTypeIds::Uint64).SetNullable(false)
};
TTestHelper::TCompression compression = TTestHelper::TCompression().SetType(arrow::Compression::type::ZSTD);

TTestHelper::TColumnTableStore testTableStore;
testTableStore.SetName("/Root/TableStoreTest").SetPrimaryKey({ "pk_int" }).SetSchema(schema);
testHelper.CreateTable(testTableStore);

TTestHelper::TColumnTable testTable;
testTable.SetName("/Root/TableStoreTest/ColumnTableTest").SetPrimaryKey({ "pk_int" }).SetSharding({ "pk_int" }).SetSchema(schema);
testHelper.CreateTable(testTable);
testHelper.SetCompression(testTable, "pk_int", compression, NYdb::EStatus::SCHEME_ERROR);
}
}
}

0 comments on commit 48dc88f

Please sign in to comment.