Gabriel39 opened a new pull request, #69545:
URL: https://github.com/apache/doris/pull/69545

   ### What problem does this PR solve?
   
   After renaming a Paimon sequence or aggregation field, current and 
historical reads can fail with a missing-field error. Paimon's table copy 
selects the historical columns but overlays current table options, so 
`sequence.field` and `fields.<column>.aggregate-function` can reference names 
that do not exist in the selected schema.
   
   JNI transport also rebuilds tables without their catalog loader. The SDK 
factory can reapply a snapshot selector during that rebuild, reverting a 
schema-only rename before the bound schema is restored. Build with selectors 
temporarily removed and then restore the complete bound schema.
   
   Restore the selected schema and its physical options together before 
applying query options. Preserve explicit catalog overrides and the SDK's 
fallback-branch snapshot translation. Apply the same logic to scan planning, 
metadata, statistics, and the source used to rebuild system-table wrappers, so 
binding and JNI serialization agree.
   
   Add real-table tests for snapshot, timestamp, tag, and OPTIONS reads after 
renames, current reads after schema-only renames, catalog-loader removal and 
serialization, catalog override precedence, fallback branches, empty-table 
timestamps, and read-optimized system tables. Add an end-to-end regression 
covering sequence semantics and repeated aggregation-field renames with 
`force_jni_scanner=false` and `true`.
   
   ### Release note
   
   Fix Paimon current and historical reads after renaming sequence or 
aggregation fields.
   
   ### Check List (For Author)
   
   - Test:
       - Baseline: 8 historical-read cases fail with missing-field errors. Two 
additional catalog-backed current-read cases fail during loader removal.
       - Full Paimon connector reactor install: 863 tests, 0 failures, 0 
errors, 1 existing skipped; all 18 new tests pass.
       - FE Checkstyle: passed. FE/BE build and connector packaging: passed.
       - End-to-end regression: all 24 query checkpoints passed on a running 
FE/BE cluster; generated expected output was reviewed and a second comparison 
run passed (1 suite, 0 failures, 0 skips).
   - Behavior changed: Yes. Current reads retain their statement-bound schema 
during JNI transport, and historical reads use field-dependent options from the 
selected schema.
   - Does this need documentation: No.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to