Skip to content

Commit 511b85d

Browse files
Merge 036b485 into ce8c6eb
2 parents ce8c6eb + 036b485 commit 511b85d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1149
-412
lines changed

ydb/core/kqp/ut/common/kqp_ut_common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ struct TKikimrSettings: public TTestFeatureFlagsHolder<TKikimrSettings> {
9898
exchangerSettings->SetMaxDelayMs(10);
9999
AppConfig.MutableColumnShardConfig()->SetDisabledOnSchemeShard(false);
100100
FeatureFlags.SetEnableSparsedColumns(true);
101+
FeatureFlags.SetEnableImmediateWritingOnBulkUpsert(true);
102+
FeatureFlags.SetEnableWritePortionsOnInsert(true);
101103
FeatureFlags.SetEnableParameterizedDecimal(true);
102104
FeatureFlags.SetEnableTopicAutopartitioningForCDC(true);
103105
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Y_UNIT_TEST_SUITE(KqpOlapAggregations) {
9595
WriteTestData(kikimr, "/Root/olapStore/olapTable", 20000, 2000000, 7000);
9696
WriteTestData(kikimr, "/Root/olapStore/olapTable", 30000, 1000000, 11000);
9797
}
98-
while (csController->GetInsertFinishedCounter().Val() == 0) {
98+
while (csController->GetCompactionFinishedCounter().Val() == 0) {
9999
Cout << "Wait indexation..." << Endl;
100100
Sleep(TDuration::Seconds(2));
101101
}
@@ -374,7 +374,7 @@ Y_UNIT_TEST_SUITE(KqpOlapAggregations) {
374374
.AddExpectedPlanOptions("KqpOlapFilter")
375375
#if SSA_RUNTIME_VERSION >= 2U
376376
.AddExpectedPlanOptions("TKqpOlapAgg")
377-
.MutableLimitChecker().SetExpectedResultCount(1)
377+
.MutableLimitChecker().SetExpectedResultCount(2)
378378
#else
379379
.AddExpectedPlanOptions("Condense")
380380
#endif
@@ -417,7 +417,7 @@ Y_UNIT_TEST_SUITE(KqpOlapAggregations) {
417417
.AddExpectedPlanOptions("KqpOlapFilter")
418418
#if SSA_RUNTIME_VERSION >= 2U
419419
.AddExpectedPlanOptions("TKqpOlapAgg")
420-
.MutableLimitChecker().SetExpectedResultCount(1)
420+
.MutableLimitChecker().SetExpectedResultCount(2)
421421
#else
422422
.AddExpectedPlanOptions("CombineCore")
423423
.AddExpectedPlanOptions("KqpOlapFilter")

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

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ Y_UNIT_TEST_SUITE(KqpOlapIndexes) {
2828

2929
Tests::NCommon::TLoggerInit(kikimr).SetComponents({NKikimrServices::TX_COLUMNSHARD}, "CS").SetPriority(NActors::NLog::PRI_DEBUG).Initialize();
3030

31-
std::vector<TString> uids;
32-
std::vector<TString> resourceIds;
33-
std::vector<ui32> levels;
34-
3531
{
3632
WriteTestData(kikimr, "/Root/olapStore/olapTable", 1000000, 300000000, 10000);
3733
WriteTestData(kikimr, "/Root/olapStore/olapTable", 1100000, 300100000, 10000);
@@ -40,24 +36,8 @@ Y_UNIT_TEST_SUITE(KqpOlapIndexes) {
4036
WriteTestData(kikimr, "/Root/olapStore/olapTable", 1400000, 300400000, 10000);
4137
WriteTestData(kikimr, "/Root/olapStore/olapTable", 2000000, 200000000, 70000);
4238
WriteTestData(kikimr, "/Root/olapStore/olapTable", 3000000, 100000000, 110000);
43-
44-
const auto filler = [&](const ui32 startRes, const ui32 startUid, const ui32 count) {
45-
for (ui32 i = 0; i < count; ++i) {
46-
uids.emplace_back("uid_" + ::ToString(startUid + i));
47-
resourceIds.emplace_back(::ToString(startRes + i));
48-
levels.emplace_back(i % 5);
49-
}
50-
};
51-
52-
filler(1000000, 300000000, 10000);
53-
filler(1100000, 300100000, 10000);
54-
filler(1200000, 300200000, 10000);
55-
filler(1300000, 300300000, 10000);
56-
filler(1400000, 300400000, 10000);
57-
filler(2000000, 200000000, 70000);
58-
filler(3000000, 100000000, 110000);
59-
6039
}
40+
csController->WaitCompactions(TDuration::Seconds(5));
6141

6242
{
6343
auto alterQuery = TStringBuilder() <<
@@ -102,7 +82,7 @@ Y_UNIT_TEST_SUITE(KqpOlapIndexes) {
10282
Cerr << csController->GetIndexesSkippingOnSelect().Val() << " / " << csController->GetIndexesApprovedOnSelect().Val() << Endl;
10383
CompareYson(result, R"([[0u;]])");
10484
AFL_VERIFY(csController->GetIndexesSkippedNoData().Val() == 0);
105-
AFL_VERIFY(csController->GetIndexesApprovedOnSelect().Val() < csController->GetIndexesSkippingOnSelect().Val() * 0.4)
85+
AFL_VERIFY(csController->GetIndexesApprovedOnSelect().Val() < csController->GetIndexesSkippingOnSelect().Val())
10686
("approve", csController->GetIndexesApprovedOnSelect().Val())("skip", csController->GetIndexesSkippingOnSelect().Val());
10787
}
10888
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using namespace NYdb::NTable;
1212
Y_UNIT_TEST_SUITE(KqpOlapStats) {
1313
constexpr size_t inserted_rows = 1000;
1414
constexpr size_t tables_in_store = 1000;
15-
constexpr size_t size_single_table = 13152;
15+
constexpr size_t size_single_table = 12688;
1616

1717
const TVector<TTestHelper::TColumnSchema> schema = {
1818
TTestHelper::TColumnSchema().SetName("id").SetType(NScheme::NTypeIds::Int32).SetNullable(false),

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
15041504
auto sender = runtime->AllocateEdgeActor();
15051505

15061506
InitRoot(server, sender);
1507-
Tests::NCommon::TLoggerInit(runtime).Initialize();
1507+
// Tests::NCommon::TLoggerInit(runtime).Initialize();
15081508

15091509
const ui32 numShards = 10;
15101510
const ui32 numIterations = 50;
@@ -2444,10 +2444,10 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
24442444
tableInserter.AddRow().Add(2).Add("test_res_2").Add("val2").AddNull();
24452445
testHelper.BulkUpsert(testTable, tableInserter);
24462446
}
2447-
while (csController->GetInsertFinishedCounter().Val() == 0) {
2448-
Cout << "Wait indexation..." << Endl;
2449-
Sleep(TDuration::Seconds(2));
2450-
}
2447+
// while (csController->GetCompactionFinishedCounter().Val() == 0) {
2448+
// Cout << "Wait indexation..." << Endl;
2449+
// Sleep(TDuration::Seconds(2));
2450+
// }
24512451
testHelper.ReadData("SELECT * FROM `/Root/ColumnTableTest` WHERE id=2", "[[2;\"test_res_2\";#;[\"val1\"]]]");
24522452
}
24532453

@@ -2470,19 +2470,19 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
24702470
tableInserter.AddRow().Add(1).Add(10);
24712471
testHelper.BulkUpsert(testTable, tableInserter);
24722472
}
2473-
while (csController->GetInsertFinishedCounter().Val() < 1) {
2474-
Cout << "Wait indexation..." << Endl;
2475-
Sleep(TDuration::Seconds(2));
2476-
}
2473+
// while (csController->GetCompactionFinishedCounter().Val() < 1) {
2474+
// Cout << "Wait compaction..." << Endl;
2475+
// Sleep(TDuration::Seconds(2));
2476+
// }
24772477
testHelper.ReadData("SELECT value FROM `/Root/ColumnTableTest` WHERE id = 1", "[[10]]");
24782478
{
24792479
TTestHelper::TUpdatesBuilder tableInserter(testTable.GetArrowSchema(schema));
24802480
tableInserter.AddRow().Add(1).Add(110);
24812481
testHelper.BulkUpsert(testTable, tableInserter);
24822482
}
24832483
testHelper.ReadData("SELECT value FROM `/Root/ColumnTableTest` WHERE id = 1", "[[110]]");
2484-
while (csController->GetInsertFinishedCounter().Val() < 2) {
2485-
Cout << "Wait indexation..." << Endl;
2484+
while (csController->GetCompactionFinishedCounter().Val() < 1) {
2485+
Cout << "Wait compaction..." << Endl;
24862486
Sleep(TDuration::Seconds(2));
24872487
}
24882488
testHelper.ReadData("SELECT value FROM `/Root/ColumnTableTest` WHERE id = 1", "[[110]]");

0 commit comments

Comments
 (0)