@@ -200,11 +200,7 @@ TEST_P(TableTest, MultiDimissionPut0) {
200200 sdk_codec.EncodeRow ({" d0" , " d1" , " d2" }, &result);
201201 bool ok = table->Put (1 , result, dimensions);
202202 ASSERT_TRUE (ok);
203- // some functions in disk table need to be implemented.
204- // refer to issue #1238
205- if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
206- ASSERT_EQ (3 , (int64_t )table->GetRecordIdxCnt ());
207- }
203+ ASSERT_EQ (3 , (int64_t )table->GetRecordIdxCnt ());
208204 ASSERT_EQ (1 , (int64_t )table->GetRecordCnt ());
209205 delete table;
210206}
@@ -326,11 +322,6 @@ TEST_P(TableTest, Iterator_GetSize) {
326322TEST_P (TableTest, SchedGcHead) {
327323 ::openmldb::common::StorageMode storageMode = GetParam ();
328324
329- // some functions with disktable mode in this test have not been implemented.
330- // refer to issue #1238
331- if (storageMode == openmldb::common::kHDD ) {
332- return ;
333- }
334325 std::map<std::string, uint32_t > mapping;
335326 mapping.insert (std::make_pair (" idx0" , 0 ));
336327 std::string table_path = " " ;
@@ -349,12 +340,8 @@ TEST_P(TableTest, SchedGcHead) {
349340 value = ::openmldb::test::EncodeKV (" test" , " test2" );
350341 table->Put (" test" , 1 , value.data (), value.size ());
351342 ASSERT_EQ (2 , (int64_t )table->GetRecordCnt ());
352- // some functions in disk table need to be implemented.
353- // refer to issue #1238
354- if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
355- ASSERT_EQ (2 , (int64_t )table->GetRecordIdxCnt ());
356- ASSERT_EQ (1 , (int64_t )table->GetRecordPkCnt ());
357- }
343+ ASSERT_EQ (2 , (int64_t )table->GetRecordIdxCnt ());
344+ ASSERT_EQ (1 , (int64_t )table->GetRecordPkCnt ());
358345 table->SchedGc ();
359346 {
360347 ::openmldb::api::LogEntry entry;
@@ -380,7 +367,9 @@ TEST_P(TableTest, SchedGcHead) {
380367 ASSERT_FALSE (table->IsExpire (entry));
381368 }
382369 }
383- ASSERT_EQ (1 , (int64_t )table->GetRecordCnt ());
370+ if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
371+ ASSERT_EQ (1 , (int64_t )table->GetRecordCnt ());
372+ }
384373 ASSERT_EQ (1 , (int64_t )table->GetRecordIdxCnt ());
385374 ASSERT_EQ (bytes, table->GetRecordByteSize ());
386375 ASSERT_EQ (record_idx_bytes, table->GetRecordIdxByteSize ());
@@ -436,11 +425,6 @@ TEST_P(TableTest, SchedGcHead1) {
436425TEST_P (TableTest, SchedGc) {
437426 ::openmldb::common::StorageMode storageMode = GetParam ();
438427
439- // some functions with disktable mode in this test have not been implemented.
440- // refer to issue #1238
441- if (storageMode == openmldb::common::kHDD ) {
442- return ;
443- }
444428 std::map<std::string, uint32_t > mapping;
445429 mapping.insert (std::make_pair (" idx0" , 0 ));
446430 std::string table_path = " " ;
@@ -459,17 +443,13 @@ TEST_P(TableTest, SchedGc) {
459443 uint64_t record_idx_bytes = table->GetRecordIdxByteSize ();
460444 table->Put (" test" , 9527 , " test" , 4 );
461445 ASSERT_EQ (2 , (int64_t )table->GetRecordCnt ());
462- // some functions in disk table need to be implemented.
463- // refer to issue #1238
464- if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
465- ASSERT_EQ (2 , (int64_t )table->GetRecordIdxCnt ());
466- ASSERT_EQ (1 , (int64_t )table->GetRecordPkCnt ());
467- }
446+ ASSERT_EQ (2 , (int64_t )table->GetRecordIdxCnt ());
447+ ASSERT_EQ (1 , (int64_t )table->GetRecordPkCnt ());
468448 table->SchedGc ();
469- ASSERT_EQ (1 , (int64_t )table->GetRecordCnt ());
470- if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
471- ASSERT_EQ (1 , (int64_t )table->GetRecordIdxCnt ());
449+ if (storageMode == ::openmldb::common::kMemory ) {
450+ ASSERT_EQ (1 , (int64_t )table->GetRecordCnt ());
472451 }
452+ ASSERT_EQ (1 , (int64_t )table->GetRecordIdxCnt ());
473453 ASSERT_EQ (bytes, table->GetRecordByteSize ());
474454 ASSERT_EQ (record_idx_bytes, table->GetRecordIdxByteSize ());
475455
@@ -487,11 +467,6 @@ TEST_P(TableTest, SchedGc) {
487467TEST_P (TableTest, TableDataCnt) {
488468 ::openmldb::common::StorageMode storageMode = GetParam ();
489469
490- // some functions with disktable mode in this test have not been implemented.
491- // refer to issue #1238
492- if (storageMode == openmldb::common::kHDD ) {
493- return ;
494- }
495470 std::map<std::string, uint32_t > mapping;
496471 mapping.insert (std::make_pair (" idx0" , 0 ));
497472 std::string table_path = " " ;
@@ -508,11 +483,7 @@ TEST_P(TableTest, TableDataCnt) {
508483 table->Put (" test" , 9527 , " test" , 4 );
509484 table->Put (" test" , now, " tes2" , 4 );
510485 ASSERT_EQ ((int64_t )table->GetRecordCnt (), 2 );
511- // some functions in disk table need to be implemented.
512- // refer to issue #1238
513- if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
514- ASSERT_EQ ((int64_t )table->GetRecordIdxCnt (), 2 );
515- }
486+ ASSERT_EQ ((int64_t )table->GetRecordIdxCnt (), 2 );
516487 table->SchedGc ();
517488 {
518489 ::openmldb::api::LogEntry entry;
@@ -1223,11 +1194,6 @@ TEST_P(TableTest, AbsOrLatSetGet) {
12231194TEST_P (TableTest, GcAbsOrLat) {
12241195 ::openmldb::common::StorageMode storageMode = GetParam ();
12251196
1226- // some functions with disktable mode in this test have not been implemented.
1227- // refer to issue #1238
1228- if (storageMode == openmldb::common::kHDD ) {
1229- return ;
1230- }
12311197 ::openmldb::api::TableMeta table_meta;
12321198 table_meta.set_name (" table1" );
12331199 std::string table_path = " " ;
@@ -1260,44 +1226,30 @@ TEST_P(TableTest, GcAbsOrLat) {
12601226 table->Put (" test2" , now - 2 * (60 * 1000 ) - 1000 , " value5" , 6 );
12611227 table->Put (" test2" , now - 1 * (60 * 1000 ) - 1000 , " value6" , 6 );
12621228 ASSERT_EQ (7 , (int64_t )table->GetRecordCnt ());
1263- // some functions in disk table need to be implemented.
1264- // refer to issue #1238
1265- if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
1266- ASSERT_EQ (7 , (int64_t )table->GetRecordIdxCnt ());
1267- ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
1268- }
1229+ ASSERT_EQ (7 , (int64_t )table->GetRecordIdxCnt ());
1230+ ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
12691231 ::openmldb::storage::UpdateTTLMeta update_ttl (
12701232 ::openmldb::storage::TTLSt (3 * 60 * 1000 , 0 , ::openmldb::storage::kAbsOrLat ));
12711233 table->SetTTL (update_ttl);
12721234 table->SchedGc ();
1273- ASSERT_EQ (5 , (int64_t )table->GetRecordCnt ());
1274- // some functions in disk table need to be implemented.
1275- // refer to issue #1238
1276- if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
1277- ASSERT_EQ (5 , (int64_t )table->GetRecordIdxCnt ());
1278- ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
1235+ if (storageMode == openmldb::common::kMemory ) {
1236+ ASSERT_EQ (5 , (int64_t )table->GetRecordCnt ());
12791237 }
1238+ ASSERT_EQ (5 , (int64_t )table->GetRecordIdxCnt ());
1239+ ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
12801240 update_ttl = ::openmldb::storage::UpdateTTLMeta (::openmldb::storage::TTLSt (0 , 1 , ::openmldb::storage::kAbsOrLat ));
12811241 table->SetTTL (update_ttl);
12821242 table->SchedGc ();
12831243 ASSERT_EQ (4 , (int64_t )table->GetRecordCnt ());
1284- // some functions in disk table need to be implemented.
1285- // refer to issue #1238
1286- if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
1287- ASSERT_EQ (4 , (int64_t )table->GetRecordIdxCnt ());
1288- ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
1289- }
1244+ ASSERT_EQ (4 , (int64_t )table->GetRecordIdxCnt ());
1245+ ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
12901246 update_ttl = ::openmldb::storage::UpdateTTLMeta (
12911247 ::openmldb::storage::TTLSt (1 * 60 * 1000 , 1 , ::openmldb::storage::kAbsOrLat ));
12921248 table->SetTTL (update_ttl);
12931249 table->SchedGc ();
12941250 ASSERT_EQ (2 , (int64_t )table->GetRecordCnt ());
1295- // some functions in disk table need to be implemented.
1296- // refer to issue #1238
1297- if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
1298- ASSERT_EQ (2 , (int64_t )table->GetRecordIdxCnt ());
1299- ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
1300- }
1251+ ASSERT_EQ (2 , (int64_t )table->GetRecordIdxCnt ());
1252+ ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
13011253 {
13021254 ::openmldb::api::LogEntry entry;
13031255 entry.set_log_index (0 );
@@ -1348,12 +1300,8 @@ TEST_P(TableTest, GcAbsOrLat) {
13481300 }
13491301 table->SchedGc ();
13501302 ASSERT_EQ (0 , (int64_t )table->GetRecordCnt ());
1351- // some functions in disk table need to be implemented.
1352- // refer to issue #1238
1353- if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
1354- ASSERT_EQ (0 , (int64_t )table->GetRecordIdxCnt ());
1355- ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
1356- }
1303+ ASSERT_EQ (0 , (int64_t )table->GetRecordIdxCnt ());
1304+ ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
13571305 {
13581306 ::openmldb::api::LogEntry entry;
13591307 entry.set_log_index (0 );
@@ -1374,11 +1322,6 @@ TEST_P(TableTest, GcAbsOrLat) {
13741322TEST_P (TableTest, GcAbsAndLat) {
13751323 ::openmldb::common::StorageMode storageMode = GetParam ();
13761324
1377- // some functions with disktable mode in this test have not been implemented.
1378- // refer to issue #1238
1379- if (storageMode == openmldb::common::kHDD ) {
1380- return ;
1381- }
13821325 ::openmldb::api::TableMeta table_meta;
13831326 table_meta.set_name (" table1" );
13841327 std::string table_path = " " ;
@@ -1411,23 +1354,15 @@ TEST_P(TableTest, GcAbsAndLat) {
14111354 table->Put (" test2" , now - 3 * (60 * 1000 ) - 1000 , " value5" , 6 );
14121355 table->Put (" test2" , now - 2 * (60 * 1000 ) - 1000 , " value6" , 6 );
14131356 ASSERT_EQ (7 , (int64_t )table->GetRecordCnt ());
1414- // some functions in disk table need to be implemented.
1415- // refer to issue #1238
1416- if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
1417- ASSERT_EQ (7 , (int64_t )table->GetRecordIdxCnt ());
1418- ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
1419- }
1357+ ASSERT_EQ (7 , (int64_t )table->GetRecordIdxCnt ());
1358+ ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
14201359 ::openmldb::storage::UpdateTTLMeta update_ttl (
14211360 ::openmldb::storage::TTLSt (1 * 60 * 1000 , 0 , ::openmldb::storage::kAbsAndLat ));
14221361 table->SetTTL (update_ttl);
14231362 table->SchedGc ();
14241363 ASSERT_EQ (6 , (int64_t )table->GetRecordCnt ());
1425- // some functions in disk table need to be implemented.
1426- // refer to issue #1238
1427- if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
1428- ASSERT_EQ (6 , (int64_t )table->GetRecordIdxCnt ());
1429- ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
1430- }
1364+ ASSERT_EQ (6 , (int64_t )table->GetRecordIdxCnt ());
1365+ ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
14311366 {
14321367 ::openmldb::api::LogEntry entry;
14331368 entry.set_log_index (0 );
@@ -1468,31 +1403,19 @@ TEST_P(TableTest, GcAbsAndLat) {
14681403 table->SetTTL (update_ttl);
14691404 table->SchedGc ();
14701405 ASSERT_EQ (6 , (int64_t )table->GetRecordCnt ());
1471- // some functions in disk table need to be implemented.
1472- // refer to issue #1238
1473- if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
1474- ASSERT_EQ (6 , (int64_t )table->GetRecordIdxCnt ());
1475- ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
1476- }
1406+ ASSERT_EQ (6 , (int64_t )table->GetRecordIdxCnt ());
1407+ ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
14771408 update_ttl = ::openmldb::storage::UpdateTTLMeta (
14781409 ::openmldb::storage::TTLSt (1 * 60 * 1000 , 1 , ::openmldb::storage::kAbsAndLat ));
14791410 table->SetTTL (update_ttl);
14801411 table->SchedGc ();
14811412 ASSERT_EQ (6 , (int64_t )table->GetRecordCnt ());
1482- // some functions in disk table need to be implemented.
1483- // refer to issue #1238
1484- if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
1485- ASSERT_EQ (6 , (int64_t )table->GetRecordIdxCnt ());
1486- ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
1487- }
1413+ ASSERT_EQ (6 , (int64_t )table->GetRecordIdxCnt ());
1414+ ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
14881415 table->SchedGc ();
14891416 ASSERT_EQ (2 , (int64_t )table->GetRecordCnt ());
1490- // some functions in disk table need to be implemented.
1491- // refer to issue #1238
1492- if (storageMode == ::openmldb::common::StorageMode::kMemory ) {
1493- ASSERT_EQ (2 , (int64_t )table->GetRecordIdxCnt ());
1494- ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
1495- }
1417+ ASSERT_EQ (2 , (int64_t )table->GetRecordIdxCnt ());
1418+ ASSERT_EQ (2 , (int64_t )table->GetRecordPkCnt ());
14961419 {
14971420 ::openmldb::api::LogEntry entry;
14981421 entry.set_log_index (0 );
0 commit comments