@@ -251,20 +251,27 @@ TEST(BinaryRowPartitionComputerTest, TestNullOrWhitespaceOnlyStr) {
251251 arrow::field (" f0" , arrow::utf8 ()),
252252 arrow::field (" f1" , arrow::utf8 ()),
253253 arrow::field (" f2" , arrow::utf8 ()),
254+ arrow::field (" f3" , arrow::utf8 ()),
254255 };
255256
256257 auto schema = arrow::schema (fields);
257- std::vector<std::string> partition_keys = {" f0" , " f1" , " f2" };
258+ std::vector<std::string> partition_keys = {" f0" , " f1" , " f2" , " f3 " };
258259 ASSERT_OK_AND_ASSIGN (
259260 std::unique_ptr<BinaryRowPartitionComputer> computer,
260261 BinaryRowPartitionComputer::Create (partition_keys, schema, " __DEFAULT_PARTITION__" ,
261262 /* legacy_partition_name_enabled=*/ true , pool));
262263
263- ASSERT_OK_AND_ASSIGN (auto partition_key_values,
264- computer->GeneratePartitionVector (BinaryRowGenerator::GenerateRow (
265- {std::string (" " ), std::string (" " ), std::string (" ab " )}, pool.get ())));
264+ ASSERT_OK_AND_ASSIGN (
265+ auto partition_key_values,
266+ computer->GeneratePartitionVector (BinaryRowGenerator::GenerateRow (
267+ {std::string (" " ), std::string (" " ), std::string (" ab " ), std::string (u8" \u3000\u2000 " )},
268+ pool.get ())));
266269 std::vector<std::pair<std::string, std::string>> expected = {
267- {" f0" , " __DEFAULT_PARTITION__" }, {" f1" , " __DEFAULT_PARTITION__" }, {" f2" , " ab " }};
270+ {" f0" , " __DEFAULT_PARTITION__" },
271+ {" f1" , " __DEFAULT_PARTITION__" },
272+ {" f2" , " ab " },
273+ {" f3" , " __DEFAULT_PARTITION__" },
274+ };
268275 ASSERT_EQ (partition_key_values, expected);
269276}
270277
0 commit comments