yuqi1129 opened a new pull request, #13603:
URL: https://github.com/apache/gravitino/pull/13603

   ### What changes were proposed in this pull request?
   
   Compare column defaults through the existing FunctionArg DTO representation 
in TableOperationDispatcher, including difference logging. Preserve the 
distinction between an unset default and explicit NULL. No storage interface or 
format changes.
   
   ### Why are the changes needed?
   
   Connector snapshots use DTO expressions, while relational storage restores 
API expressions. Comparing them directly makes unchanged defaults appear 
different, causing repeated loadTable calls to rewrite table and column 
metadata.
   
   Fix: #13590
   
   ### Does this PR introduce _any_ user-facing change?
   
   Loading an unchanged table no longer rewrites metadata because of 
default-expression representation differences. Real default changes still 
synchronize. No API or configuration changes.
   
   ### How was this patch tested?
   
   - Added nine regression cases using connector snapshots and a memory-store 
fixture with production relational column serialization/deserialization. They 
cover unset/NULL transitions, literals, literal type changes, functions, nested 
arguments, unparsed expressions, and field references. The tests assert that 
snapshot/stored expression classes differ. Repeated loads produce no updates; 
an external default change on the second column produces one update, preserves 
its ID, and leaves the first column unchanged. All nine cases fail before the 
fix.
   - Updated existing column assertions to compare canonical defaults without 
requiring an incidental rewrite to DTOs.
   - 84 tests passed across TestTableOperationDispatcher, TestPOConverters, and 
TestOperationDispatcherSnapshots with -PskipITs.
   - ./gradlew spotlessApply and git diff --check passed.
   


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