Skip to content

Commit 48dc88f

Browse files
author
Vladislav Gogov
authored
Added test: Alter compression for ColumnTable in TableStore (#9781)
1 parent 6bec40a commit 48dc88f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

ydb/core/kqp/ut/olap/compression_ut.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,23 @@ Y_UNIT_TEST_SUITE(KqpOlapCompression) {
4545
testHelper.CreateTable(testTableStore);
4646
testHelper.SetCompression(testTableStore, "pk_int", compression);
4747
}
48+
49+
Y_UNIT_TEST(TestAlterCompressionTableInTableStore) {
50+
TKikimrSettings settings = TKikimrSettings().SetWithSampleTables(false);
51+
TTestHelper testHelper(settings);
52+
TVector<TTestHelper::TColumnSchema> schema = {
53+
TTestHelper::TColumnSchema().SetName("pk_int").SetType(NScheme::NTypeIds::Uint64).SetNullable(false)
54+
};
55+
TTestHelper::TCompression compression = TTestHelper::TCompression().SetType(arrow::Compression::type::ZSTD);
56+
57+
TTestHelper::TColumnTableStore testTableStore;
58+
testTableStore.SetName("/Root/TableStoreTest").SetPrimaryKey({ "pk_int" }).SetSchema(schema);
59+
testHelper.CreateTable(testTableStore);
60+
61+
TTestHelper::TColumnTable testTable;
62+
testTable.SetName("/Root/TableStoreTest/ColumnTableTest").SetPrimaryKey({ "pk_int" }).SetSharding({ "pk_int" }).SetSchema(schema);
63+
testHelper.CreateTable(testTable);
64+
testHelper.SetCompression(testTable, "pk_int", compression, NYdb::EStatus::SCHEME_ERROR);
65+
}
4866
}
4967
}

0 commit comments

Comments
 (0)