ChaomingZhangCN commented on code in PR #281:
URL: https://github.com/apache/paimon-cpp/pull/281#discussion_r3932757785


##########
src/paimon/core/mergetree/compact/aggregate/field_listagg_agg_test.cpp:
##########
@@ -148,39 +160,39 @@ TEST_F(FieldListaggAggTest, 
TestDistinctIgnoresBlankTokens) {
     auto ret =
         agg->Agg(std::string_view("user1"), std::string_view(u8" 
,user2,\t,\u3000,user1,\u2000"))
             .value();
-    ASSERT_EQ(DataDefine::GetVariantValue<std::string_view>(ret), 
"user1,user2");
+    ASSERT_EQ(DataDefine::GetStringView(ret), "user1,user2");
 }
 
 TEST_F(FieldListaggAggTest, TestDistinctNoDuplicates) {
     ASSERT_OK_AND_ASSIGN(auto agg, MakeAgg(" ", true));
 
     // "a b" + "c d" -> "a b c d" (no dups to remove)
     auto ret = agg->Agg(std::string_view("a b"), std::string_view("c 
d")).value();
-    ASSERT_EQ(DataDefine::GetVariantValue<std::string_view>(ret), "a b c d");
+    ASSERT_EQ(DataDefine::GetStringView(ret), "a b c d");
 }
 
 TEST_F(FieldListaggAggTest, 
TestDistinctWithEmptyDelimiterFallsBackToWhitespace) {
     ASSERT_OK_AND_ASSIGN(auto agg, MakeAgg("", true));
 
     // Empty delimiter falls back to whitespace, so the repeated "b" is 
removed.
     auto ret = agg->Agg(std::string_view("a b"), std::string_view("b 
c")).value();
-    ASSERT_EQ(DataDefine::GetVariantValue<std::string_view>(ret), "a b c");
+    ASSERT_EQ(DataDefine::GetStringView(ret), "a b c");
 }
 
 TEST_F(FieldListaggAggTest, TestDistinctEmptyInput) {
     ASSERT_OK_AND_ASSIGN(auto agg, MakeAgg(";", true));
 
     // empty input -> return accumulator
     auto ret = agg->Agg(std::string_view("a;b"), std::string_view("")).value();
-    ASSERT_EQ(DataDefine::GetVariantValue<std::string_view>(ret), "a;b");
+    ASSERT_EQ(DataDefine::GetStringView(ret), "a;b");
 }
 
 TEST_F(FieldListaggAggTest, TestDistinctFalse) {
     ASSERT_OK_AND_ASSIGN(auto agg, MakeAgg(";", false));
 
     // "a;b" + "b;c" -> "a;b;b;c" (no dedup)
     auto ret = agg->Agg(std::string_view("a;b"), 
std::string_view("b;c")).value();
-    ASSERT_EQ(DataDefine::GetVariantValue<std::string_view>(ret), "a;b;b;c");
+    ASSERT_EQ(DataDefine::GetStringView(ret), "a;b;b;c");
 }

Review Comment:
   Added `TestPKListAggPreservesResultsAcrossKeys` in 
`write_and_read_inte_test.cpp` in 76aee1a. It writes two PKs across two commits 
and verifies `alpha,beta` / `one,two`; it fails deterministically before the 
fix and passes for Parquet, ORC, and Avro after the fix. Thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to