Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/paimon/common/predicate/literal_converter_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ TEST_F(LiteralConverterTest, TestStringLiteral) {
std::vector<Literal>({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)});
}
Expand All @@ -217,7 +217,7 @@ TEST_F(LiteralConverterTest, TestBinaryLiteral) {
std::vector<Literal>({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)});
}
Expand Down
6 changes: 3 additions & 3 deletions src/paimon/common/reader/data_evolution_row_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ TEST(DataEvolutionRowTest, TestSimple) {
std::vector<int32_t> 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);
Expand Down Expand Up @@ -73,7 +73,7 @@ TEST(DataEvolutionRowTest, TestNull) {
std::vector<int32_t> 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());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <cstdint>
#include <limits>
#include <string>
#include <variant>

#include "arrow/type.h"
Expand Down Expand Up @@ -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<std::pair<std::string, std::string>> expected = {
{"f0", "__DEFAULT_PARTITION__"}, {"f1", "__DEFAULT_PARTITION__"}, {"f2", "ab "}};
ASSERT_EQ(partition_key_values, expected);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Bytes>("1.12", pool_.get()),
std::make_shared<Bytes>("2.12", pool_.get())});
}
Expand Down
Loading