File tree 2 files changed +21
-1
lines changed
2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 3
3
#include < ydb/core/testlib/common_helper.h>
4
4
#include < ydb/core/tx/columnshard/hooks/testing/controller.h>
5
5
6
+ #include < ut/olap/helpers/get_value.h>
7
+ #include < ut/olap/helpers/query_executor.h>
8
+
6
9
namespace NKikimr {
7
10
namespace NKqp {
8
11
@@ -196,6 +199,23 @@ Y_UNIT_TEST_SUITE(KqpOlapStats) {
196
199
const auto & storeDescription = describeStoreResult.GetTableDescription ();
197
200
198
201
UNIT_ASSERT_VALUES_EQUAL (2000 , storeDescription.GetTableRows ());
202
+
203
+ {
204
+ auto selectQuery = TString (R"(
205
+ SELECT
206
+ SUM(ColumnBlobBytes) AS BlobBytes,
207
+ SUM(ColumnRawBytes) AS RawBytes,
208
+ SUM(Rows) AS Rows,
209
+ COUNT(*) AS Portions
210
+ FROM `/Root/TableStoreTest/.sys/store_primary_index_portion_stats`
211
+ )" );
212
+
213
+ auto client = testHelper.GetKikimr ().GetTableClient ();
214
+ auto rows = ExecuteScanQuery (client, selectQuery);
215
+ UNIT_ASSERT_VALUES_EQUAL (rows.size (), 1 );
216
+ UNIT_ASSERT_VALUES_EQUAL (GetUint64 (rows[0 ].at (" Rows" )), storeDescription.GetTableRows ());
217
+ UNIT_ASSERT_VALUES_EQUAL (GetUint64 (rows[0 ].at (" BlobBytes" )), storeDescription.GetTableSize ());
218
+ }
199
219
}
200
220
}
201
221
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class TSimplePortionsGroupInfo {
55
55
TSimplePortionsGroupInfo& operator +=(const TSimplePortionsGroupInfo& item) {
56
56
Blobs += item.Blobs ;
57
57
BlobBytes += item.BlobBytes ;
58
- RawBytes += RawBytes + item.RawBytes ;
58
+ RawBytes += item.RawBytes ;
59
59
Count += item.Count ;
60
60
RecordsCount += item.RecordsCount ;
61
61
for (const auto & [channel, bytes] : item.BytesByChannel ) {
You can’t perform that action at this time.
0 commit comments