wzx140 commented on code in PR #3459:
URL: https://github.com/apache/fluss/pull/3459#discussion_r3467228993


##########
fluss-server/src/main/java/org/apache/fluss/server/coordinator/MetadataManager.java:
##########
@@ -440,6 +441,7 @@ public void alterTableSchema(
             if (!schemaChanges.isEmpty()) {
                 Schema newSchema =

Review Comment:
   @luoyuxia  Let me summarize the current situation a bit, since this part is 
somewhat subtle.
   
   I think `fields.*.agg` should be treated as the Flink SQL option 
representation of column aggregation functions, rather than as the 
authoritative storage in Fluss table properties.
   
   For Flink SQL `CREATE TABLE`, these options are parsed and converted into 
the column-level `AggFunction` in the Fluss schema. For Flink SQL `SHOW CREATE 
TABLE`, the options can be reconstructed from the column-level aggregation 
metadata for display.
   
   The actual source of truth in Fluss metadata should remain the schema column 
`AggFunction`. Persisting the same aggregation information again in table 
properties would duplicate the metadata in two places and could introduce 
consistency issues.
   
   This is also consistent with the Java API behavior: when a table is created 
with column-level `AggFunction`s through the Java API, 
`TableInfo#getProperties()` / `getCustomProperties()` do not contain 
`fields.*.agg`; the aggregation metadata is stored on the schema columns.



-- 
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