zhoulii opened a new issue, #10747:
URL: https://github.com/apache/paimon/issues/10747

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   
   ### Paimon version
   
   2.0
   
   ### Compute Engine
   
   PyPaimon
   
   ### Minimal reproduce step
   
   The workflow is to validate a counter type change on a separate branch while 
main continues receiving data, then read a fixed snapshot of that branch.
   
   1. Create an append-only table with `id BIGINT` and `count INT`. Write an 
initial batch and create a tag for snapshot 1.
   2. Create branch `dev` from that tag.
   3. Append another batch to main without changing its schema, producing main 
snapshot 2.
   4. On dev, widen `count` to BIGINT and write a row with `count = 
3000000000`, producing dev snapshot 2.
   5. Load the main table and read using `table.copy({'branch': 'dev', 
'scan.snapshot-id': '2'})`.
   
   ### What doesn't meet your expectations?
   
   The row written on dev returns `count = -1294967296` instead of 
`3000000000`, without an error. The read uses dev's data but main's INT schema.
   
   Selecting the branch first and then applying the snapshot option in a second 
`copy()` returns the correct BIGINT value. Loading `db.table$branch_dev` 
directly and then selecting snapshot 2 also works. These reads should produce 
the same schema and values.
   
   
   ### Anything else?
   
   `FileStoreTable._copy()` resolves the historical schema through the original 
table's managers before switching the branch identifier.
   
   This also affects adding columns: a column added only on dev is missing from 
the result. 
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


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