[FEAT MERGE] merge transfer

Co-authored-by: wxhwang <wxhwang@126.com>
Co-authored-by: godyangfight <godyangfight@gmail.com>
Co-authored-by: Tyshawn <tuyunshan@gmail.com>
This commit is contained in:
xuhuleon
2023-06-21 11:42:26 +00:00
committed by ob-robot
parent d06678002e
commit 9dae112952
1280 changed files with 149724 additions and 48813 deletions

View File

@ -7,4 +7,4 @@ storage_unittest(test_hex)
storage_unittest(test_encoding_util)
storage_unittest(test_raw_decoder)
storage_unittest(test_const_decoder)
storage_unittest(test_general_column_decoder)
storage_unittest(test_general_column_decoder)

View File

@ -29,6 +29,7 @@
#include "lib/string/ob_sql_string.h"
#include "../ob_row_generate.h"
#include "common/rowkey/ob_rowkey.h"
#include "unittest/storage/mock_ob_table_read_info.h"
namespace oceanbase
{
@ -103,7 +104,7 @@ protected:
ObMicroBlockEncodingCtx ctx_;
common::ObArray<share::schema::ObColDesc> col_descs_;
ObMicroBlockEncoder encoder_;
ObTableReadInfo read_info_;
MockObTableReadInfo read_info_;
ObArenaAllocator allocator_;
bool is_retro_;
ObColumnHeader::Type column_encoding_type_;
@ -247,8 +248,7 @@ void TestColumnDecoder::SetUp()
table.get_column_count(),
table.get_rowkey_column_num(),
lib::is_oracle_mode(),
col_descs_,
true));
col_descs_));
ctx_.micro_block_size_ = 64L << 11;
ctx_.macro_block_size_ = 2L << 20;

View File

@ -657,7 +657,7 @@ TEST_F(TestConstDecoder, batch_decode_to_datum_test_with_expection)
int main(int argc, char **argv)
{
system("rm -f test_const_decoder.log*");
OB_LOGGER.set_file_name("test_const_decoder.log", true, false);
OB_LOGGER.set_file_name("test_const_decoder.log");
oceanbase::common::ObLogger::get_logger().set_log_level("INFO");
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();

View File

@ -56,7 +56,7 @@ protected:
ObObjType *col_types_;
ObRowGenerate row_generate_;
ObMicroBlockEncodingCtx ctx_;
ObTableReadInfo read_info_;
ObRowkeyReadInfo read_info_;
ObArenaAllocator allocator_;
common::ObArray<share::schema::ObColDesc> col_descs_;
bool is_multi_version_row_;
@ -65,6 +65,7 @@ protected:
void TestIColumnEncoder::SetUp()
{
oceanbase::ObClusterVersion::get_instance().update_data_version(DATA_CURRENT_VERSION);
const int64_t tid = 200001;
ObTableSchema table;
ObColumnSchemaV2 col;
@ -105,8 +106,7 @@ void TestIColumnEncoder::SetUp()
row_generate_.get_schema().get_column_count(),
row_generate_.get_schema().get_rowkey_column_num(),
lib::is_oracle_mode(),
col_descs_,
true));
col_descs_));
ctx_.micro_block_size_ = 1L << 20; // 1MB, maximum micro block size;
ctx_.macro_block_size_ = 2L << 20;
@ -217,7 +217,7 @@ TEST_F(TestDictLargeVarchar, test_dict_large_varchar)
ObMicroBlockDecoder decoder;
ObDatumRow read_row;
ASSERT_EQ(OB_SUCCESS, read_row.init(full_column_cnt_));
ASSERT_EQ(OB_SUCCESS, decoder.init(micro_data, read_info_));
ASSERT_EQ(OB_SUCCESS, decoder.init(micro_data, nullptr));
ASSERT_EQ(OB_SUCCESS, decoder.get_row(0, read_row));
STORAGE_LOG(DEBUG, "read row", K(read_row));
@ -304,7 +304,7 @@ TEST_F(TestColumnEqualExceptionList, test_column_equal_ext_offset_overflow)
ObMicroBlockDecoder decoder;
ObDatumRow read_row;
ASSERT_EQ(OB_SUCCESS, read_row.init(column_cnt_));
ASSERT_EQ(OB_SUCCESS, decoder.init(micro_data, read_info_));
ASSERT_EQ(OB_SUCCESS, decoder.init(micro_data, nullptr));
int64_t new_checksum = 0;
for (int64_t i = 0; i < row_cnt; ++i) {
@ -337,7 +337,7 @@ TEST_F(TestEncodingRowBufHolder, test_encoding_row_buf_holder)
ASSERT_EQ(OB_SUCCESS, buf_holder.init(OB_DEFAULT_MACRO_BLOCK_SIZE));
ASSERT_EQ(OB_INVALID_ARGUMENT, buf_holder.try_alloc(4 * OB_DEFAULT_MACRO_BLOCK_SIZE));
const char *test_mark = "fly me to the moon";
const int test_mark_len = strlen(test_mark);
const int64_t first_alloc_size = 4096;
const int64_t snd_alloc_size = static_cast<int64_t>(first_alloc_size * 1.2);
@ -365,7 +365,7 @@ TEST_F(TestEncodingRowBufHolder, test_encoding_row_buf_holder)
int main(int argc, char **argv)
{
system("rm -f test_micro_block_encoder.log*");
OB_LOGGER.set_file_name("test_micro_block_encoder.log", true, false);
OB_LOGGER.set_file_name("test_micro_block_encoder.log");
oceanbase::common::ObLogger::get_logger().set_log_level("INFO");
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();

View File

@ -27,6 +27,7 @@
#include "lib/string/ob_sql_string.h"
#include "../ob_row_generate.h"
#include "common/rowkey/ob_rowkey.h"
#include "unittest/storage/mock_ob_table_read_info.h"
namespace oceanbase
@ -205,7 +206,7 @@ public:
virtual void SetUp();
virtual void TearDown() {}
TestRawDecoder():tenant_ctx_(OB_SERVER_TENANT_ID)
TestRawDecoder(): tenant_ctx_(OB_SERVER_TENANT_ID)
{
share::ObTenantEnv::set_tenant(&tenant_ctx_);
}
@ -224,7 +225,7 @@ protected:
ObMicroBlockEncodingCtx ctx_;
common::ObArray<share::schema::ObColDesc> col_descs_;
ObMicroBlockRawEncoder encoder_;
ObTableReadInfo read_info_;
MockObTableReadInfo read_info_;
int64_t full_column_cnt_;
ObArenaAllocator allocator_;
share::ObTenantBase tenant_ctx_;
@ -232,6 +233,7 @@ protected:
void TestRawDecoder::SetUp()
{
oceanbase::ObClusterVersion::get_instance().update_data_version(DATA_CURRENT_VERSION);
const int64_t tid = 200001;
ObTableSchema table;
ObColumnSchemaV2 col;
@ -299,8 +301,7 @@ void TestRawDecoder::SetUp()
table.get_column_count(),
table.get_rowkey_column_num(),
lib::is_oracle_mode(),
col_descs_,
true));
col_descs_));
const int64_t extra_rowkey_cnt = ObMultiVersionRowkeyHelpper::get_extra_rowkey_col_cnt();
full_column_cnt_ = COLUMN_CNT + extra_rowkey_cnt;
@ -532,11 +533,6 @@ TEST_F(TestRawDecoder, filter_push_down_gt_lt_ge_le)
ASSERT_EQ(OB_SUCCESS, test_filter_pushdown(col_idx, decoder, white_filter, result_bitmap, objs));
ASSERT_EQ(seed0_count + seed1_count, result_bitmap.popcnt());
// Invalid input parameter
objs.pop_back();
ASSERT_EQ(objs.count(), 0);
ASSERT_EQ(OB_INVALID_ARGUMENT, test_filter_pushdown(col_idx, decoder, white_filter, result_bitmap, objs));
}
}