diff --git a/src/paimon/common/predicate/literal_converter_test.cpp b/src/paimon/common/predicate/literal_converter_test.cpp index d6bc08ee8..7d6ea27ff 100644 --- a/src/paimon/common/predicate/literal_converter_test.cpp +++ b/src/paimon/common/predicate/literal_converter_test.cpp @@ -198,7 +198,7 @@ TEST_F(LiteralConverterTest, TestStringLiteral) { std::vector({Literal(FieldType::STRING, "apple", 5), Literal(FieldType::STRING, str.data(), str.size())})); CheckLiteralFromRow( - arrow::utf8(), {"apple", "苹果", NullType()}, FieldType::STRING, + arrow::utf8(), {std::string("apple"), std::string("苹果"), NullType()}, FieldType::STRING, {Literal(FieldType::STRING, "apple", 5), Literal(FieldType::STRING, str.data(), str.size()), Literal(FieldType::STRING)}); } @@ -217,7 +217,7 @@ TEST_F(LiteralConverterTest, TestBinaryLiteral) { std::vector({Literal(FieldType::BINARY, "apple", 5), Literal(FieldType::BINARY, str.data(), str.size())})); CheckLiteralFromRow( - arrow::binary(), {"apple", "苹果", NullType()}, FieldType::BINARY, + arrow::binary(), {std::string("apple"), std::string("苹果"), NullType()}, FieldType::BINARY, {Literal(FieldType::BINARY, "apple", 5), Literal(FieldType::BINARY, str.data(), str.size()), Literal(FieldType::BINARY)}); } diff --git a/src/paimon/common/reader/data_evolution_row_test.cpp b/src/paimon/common/reader/data_evolution_row_test.cpp index 1b965e9e5..0908936cc 100644 --- a/src/paimon/common/reader/data_evolution_row_test.cpp +++ b/src/paimon/common/reader/data_evolution_row_test.cpp @@ -38,9 +38,9 @@ TEST(DataEvolutionRowTest, TestSimple) { std::vector field_offsets = {0, 0, 1, 1, 1, 0}; auto pool = GetDefaultPool(); - BinaryRow row1 = BinaryRowGenerator::GenerateRow({0, "00"}, pool.get()); + BinaryRow row1 = BinaryRowGenerator::GenerateRow({0, std::string("00")}, pool.get()); BinaryRow row2 = BinaryRowGenerator::GenerateRow({10, 110}, pool.get()); - BinaryRow row3 = BinaryRowGenerator::GenerateRow({20, "20"}, pool.get()); + BinaryRow row3 = BinaryRowGenerator::GenerateRow({20, std::string("20")}, pool.get()); DataEvolutionRow row({row1, row2, row3}, row_offsets, field_offsets); ASSERT_EQ(row.GetFieldCount(), 6); @@ -73,7 +73,7 @@ TEST(DataEvolutionRowTest, TestNull) { std::vector field_offsets = {0, 0, 1, 1, 1, 0, -1, -1}; auto pool = GetDefaultPool(); - BinaryRow row1 = BinaryRowGenerator::GenerateRow({0, "00"}, pool.get()); + BinaryRow row1 = BinaryRowGenerator::GenerateRow({0, std::string("00")}, pool.get()); BinaryRow row2 = BinaryRowGenerator::GenerateRow({10, 110}, pool.get()); BinaryRow row3 = BinaryRowGenerator::GenerateRow({20, NullType()}, pool.get()); diff --git a/src/paimon/common/utils/binary_row_partition_computer_test.cpp b/src/paimon/common/utils/binary_row_partition_computer_test.cpp index 837649bf3..c1e3add03 100644 --- a/src/paimon/common/utils/binary_row_partition_computer_test.cpp +++ b/src/paimon/common/utils/binary_row_partition_computer_test.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include "arrow/type.h" @@ -275,8 +276,8 @@ TEST(BinaryRowPartitionComputerTest, TestNullOrWhitespaceOnlyStr) { /*legacy_partition_name_enabled=*/true, pool)); ASSERT_OK_AND_ASSIGN(auto partition_key_values, - computer->GeneratePartitionVector( - BinaryRowGenerator::GenerateRow({" ", "", "ab "}, pool.get()))); + computer->GeneratePartitionVector(BinaryRowGenerator::GenerateRow( + {std::string(" "), std::string(""), std::string("ab ")}, pool.get()))); std::vector> expected = { {"f0", "__DEFAULT_PARTITION__"}, {"f1", "__DEFAULT_PARTITION__"}, {"f2", "ab "}}; ASSERT_EQ(partition_key_values, expected); diff --git a/src/paimon/core/io/key_value_in_memory_record_reader_test.cpp b/src/paimon/core/io/key_value_in_memory_record_reader_test.cpp index ab3dfad08..1c7fe8f21 100644 --- a/src/paimon/core/io/key_value_in_memory_record_reader_test.cpp +++ b/src/paimon/core/io/key_value_in_memory_record_reader_test.cpp @@ -394,7 +394,7 @@ TEST_F(KeyValueInMemoryRecordReaderTest, TestVariantType) { ])") .ValueOrDie()); - CheckVariantType(fields, std::move(src_array), {"1.1", "2.1"}, + CheckVariantType(fields, std::move(src_array), {std::string("1.1"), std::string("2.1")}, {std::make_shared("1.12", pool_.get()), std::make_shared("2.12", pool_.get())}); }