Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
Mryange committed Dec 20, 2024
1 parent d2a5ab5 commit 0335cae
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions be/test/vec/columns/common_column_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ class CommonColumnTest : public ::testing::Test {
// check size
EXPECT_EQ(ptr->size(), *cl);
// check ptr is not the same
EXPECT_NE(ptr.get(), source_column);
EXPECT_NE(ptr.get(), source_column.get());

// check after clone_resized with assert_res
auto ser_col = ColumnString::create();
Expand Down Expand Up @@ -1042,7 +1042,7 @@ class CommonColumnTest : public ::testing::Test {
// check size
EXPECT_EQ(ptr->size(), insert_size);
// check ptr is not the same
EXPECT_NE(ptr.get(), source_column);
EXPECT_NE(ptr.get(), source_column.get());
// check after cut with assert_res
auto ser_col = ColumnString::create();
ser_col->reserve(ptr->size());
Expand Down Expand Up @@ -1095,7 +1095,7 @@ class CommonColumnTest : public ::testing::Test {
// check size
EXPECT_EQ(ptr->size(), insert_size);
// check ptr is not the same
EXPECT_NE(ptr.get(), source_column);
EXPECT_NE(ptr.get(), source_column.get());
// check after cut with assert_res
auto ser_col = ColumnString::create();
ser_col->reserve(ptr->size());
Expand Down
12 changes: 6 additions & 6 deletions be/test/vec/data_types/from_string_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ TEST(FromStringTest, ScalaWrapperFieldVsDataType) {
string test_str = std::get<1>(type_pair)[i];
// data_type from_string
ReadBuffer rb_test(test_str.data(), test_str.size());
Status st = data_type_ptr->from_string(rb_test, col);
Status st = data_type_ptr->from_string(rb_test, col.get());
if (std::get<3>(type_pair)[i].empty()) {
EXPECT_EQ(st.ok(), false);
std::cout << "deserialize failed: " << st.to_json() << std::endl;
Expand Down Expand Up @@ -256,11 +256,11 @@ TEST(FromStringTest, ScalaWrapperFieldVsDataType) {
ReadBuffer rand_rb(rand_date.data(), rand_date.size());

auto col = data_type_ptr->create_column();
Status st = data_type_ptr->from_string(min_rb, col);
Status st = data_type_ptr->from_string(min_rb, col.get());
EXPECT_EQ(st.ok(), true);
st = data_type_ptr->from_string(max_rb, col);
st = data_type_ptr->from_string(max_rb, col.get());
EXPECT_EQ(st.ok(), true);
st = data_type_ptr->from_string(rand_rb, col);
st = data_type_ptr->from_string(rand_rb, col.get());
EXPECT_EQ(st.ok(), true);

string min_s_d = data_type_ptr->to_string(*col, 0);
Expand Down Expand Up @@ -319,7 +319,7 @@ TEST(FromStringTest, ScalaWrapperFieldVsDataType) {
string rand_ip = rand_wf->to_string();
ReadBuffer rand_rb(rand_ip.data(), rand_ip.size());
auto col = data_type_ptr->create_column();
st = data_type_ptr->from_string(rand_rb, col);
st = data_type_ptr->from_string(rand_rb, col.get());
EXPECT_EQ(st.ok(), true);
string rand_s_d = data_type_ptr->to_string(*col, 0);
rtrim(rand_ip);
Expand All @@ -336,7 +336,7 @@ TEST(FromStringTest, ScalaWrapperFieldVsDataType) {
EXPECT_EQ(st.ok(), false);
ReadBuffer rand_rb(pair.second.data(), pair.second.size());
auto col = data_type_ptr->create_column();
st = data_type_ptr->from_string(rand_rb, col);
st = data_type_ptr->from_string(rand_rb, col.get());
EXPECT_EQ(st.ok(), false);
}
}
Expand Down
12 changes: 6 additions & 6 deletions be/test/vec/data_types/serde/data_type_serde_text_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ TEST(TextSerde, ComplexTypeSerdeTextTest) {
{
// from_string
ReadBuffer rb(rand_str.data(), rand_str.size());
Status status = array_data_type_ptr->from_string(rb, col2);
Status status = array_data_type_ptr->from_string(rb, col2.get());
EXPECT_EQ(status.ok(), true);
auto ser_col = ColumnString::create();
ser_col->reserve(1);
Expand Down Expand Up @@ -661,7 +661,7 @@ TEST(TextSerde, ComplexTypeSerdeTextTest) {
{
ReadBuffer rb(rand_str.data(), rand_str.size());
std::cout << "from string rb: " << rb.to_string() << std::endl;
Status stat = map_data_type_ptr->from_string(rb, col2);
Status stat = map_data_type_ptr->from_string(rb, col2.get());
std::cout << stat.to_json() << std::endl;
auto ser_col = ColumnString::create();
ser_col->reserve(1);
Expand Down Expand Up @@ -840,7 +840,7 @@ TEST(TextSerde, ComplexTypeWithNestedSerdeTextTest) {
// from_string
ReadBuffer rb(rand_str.data(), rand_str.size());
auto col2 = array_data_type_ptr->create_column();
Status status = array_data_type_ptr->from_string(rb, col2);
Status status = array_data_type_ptr->from_string(rb, col2.get());
if (expect_from_string_str == "") {
EXPECT_EQ(status.ok(), false);
std::cout << "test from_string: " << status.to_json() << std::endl;
Expand Down Expand Up @@ -995,7 +995,7 @@ TEST(TextSerde, ComplexTypeWithNestedSerdeTextTest) {
// from_string
ReadBuffer rb(rand_str.data(), rand_str.size());
auto col2 = array_data_type_ptr->create_column();
Status status = array_data_type_ptr->from_string(rb, col2);
Status status = array_data_type_ptr->from_string(rb, col2.get());
if (expect_from_string_str == "") {
EXPECT_EQ(status.ok(), false);
std::cout << "test from_string: " << status.to_json() << std::endl;
Expand Down Expand Up @@ -1213,7 +1213,7 @@ TEST(TextSerde, ComplexTypeWithNestedSerdeTextTest) {
// from_string
ReadBuffer rb(rand_str.data(), rand_str.size());
auto col2 = map_data_type_ptr->create_column();
Status status = map_data_type_ptr->from_string(rb, col2);
Status status = map_data_type_ptr->from_string(rb, col2.get());
if (expect_from_string_str == "") {
EXPECT_EQ(status.ok(), false);
std::cout << "test from_string: " << status.to_json() << std::endl;
Expand Down Expand Up @@ -1354,7 +1354,7 @@ TEST(TextSerde, ComplexTypeWithNestedSerdeTextTest) {
// from_string
ReadBuffer rb(rand_str.data(), rand_str.size());
auto col2 = array_data_type_ptr->create_column();
Status status = array_data_type_ptr->from_string(rb, col2);
Status status = array_data_type_ptr->from_string(rb, col2.get());
if (expect_from_string_str == "") {
EXPECT_EQ(status.ok(), false);
std::cout << "test from_string: " << status.to_json() << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion be/test/vec/function/function_test_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ Status check_function(const std::string& func_name, const InputTypeSet& input_ty

// 3. check the result of function
ColumnPtr column = block.get_columns()[result];
EXPECT_TRUE(column != nullptr);
EXPECT_TRUE(column);

for (int i = 0; i < row_size; ++i) {
// update current line
Expand Down
6 changes: 3 additions & 3 deletions be/test/vec/olap/char_type_padding_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ TEST(CharTypePaddingTest, CharTypePaddingFullTest) {
for (size_t i = 0; i < rows; i++) {
input->insert_data(str.data(), str.length());
}
EXPECT_FALSE(ConvertorChar::should_padding(input, str.length()));
EXPECT_FALSE(ConvertorChar::should_padding(input.get(), str.length()));

input->insert_data(str.data(), str.length() - 1);
EXPECT_TRUE(ConvertorChar::should_padding(input, str.length()));
EXPECT_TRUE(ConvertorChar::should_padding(input.get(), str.length()));
}

TEST(CharTypePaddingTest, CharTypePaddingDataTest) {
Expand All @@ -56,7 +56,7 @@ TEST(CharTypePaddingTest, CharTypePaddingDataTest) {
input->insert_data(str.data(), str.length() - i);
}

auto output = ConvertorChar::clone_and_padding(input, str.length());
auto output = ConvertorChar::clone_and_padding(input.get(), str.length());

for (int i = 0; i < rows; i++) {
auto cell = output->get_data_at(i).to_string();
Expand Down

0 comments on commit 0335cae

Please sign in to comment.