Hi, Currently agg func only works for the top level field, but cannot work for nested fields.
Best, Jingsong On Sun, Oct 26, 2025 at 12:18 PM 齐先生 <[email protected]> wrote: > > Dear Paimon Community Team, > I hope this email finds you well. I encountered an issue when using Paimon > where the `sum` aggregation function on internal fields of a ROW type does > not work as expected. Instead of aggregating values, the data is overwritten > (only the last value is retained). Below is a reproducible test case, and I > would appreciate your guidance on this matter. Test Case Details 1. Table > Creation Statement ```sql CREATE TABLE "test_row_agg" ( "id" INT, "data" > ROW("num" INT, "info" VARCHAR) ) WITH ( options='{ > "merge-engine":"partial-update", "fields.data.num.aggregate-function":"sum", > "fields.data.sequence-group":"data" }', primary_key=ARRAY['id'], bucket=4, > bucket_key=ARRAY['id'] ); ``` 2. Insert Test Data (Two Writes with the Same > Primary Key) ```sql INSERT INTO "test_row_agg" ("id", "data") VALUES (1, > ROW(10, 'info1')); INSERT INTO "test_row_agg" ("id", "data") VALUES (1, > ROW(20, 'info2')); ``` 3. Query Result (Expected `data.num = 30`, Actual > Result is `20`) ```sql > SELECT "id", "data"."num" FROM "test_row_agg" WHERE "id" = 1; > -- res in next > i expected (1,30) > but res is (1,20) > this is update, not sum,why? > ``` ### Environment Information - Paimon Version: 1.2 - Flink Version: 1.20.1 > Is this a known limitation, or is there an oversight in my configuration? I > look forward to your response. Thank you for your support. Best regards, Q7
