thswlsqls opened a new pull request, #17066:
URL: https://github.com/apache/iceberg/pull/17066

   
   Closes #17063
   
   ## Summary
   
   - `ShreddedObject.put(field, value)` left a prior `remove(field)` marker in 
`removedFields`, so `remove()` followed by `put()` of the same field made 
`get()`/`fieldNames()`/`numFields()` report the field missing while `writeTo()` 
still serialized it with the new value.
   - Fix clears `removedFields.remove(field)` in `put()`, mirroring how 
`remove()` already clears `shreddedFields` for the field.
   - Query API and serialized bytes now agree after a remove-then-put sequence.
   
   ## Testing done
   
   - Added `TestShreddedObject#testPutAfterRemoveClearsRemoveMarker` covering 
`remove()` then `put()` of the same field, asserting 
`get()`/`numFields()`/`fieldNames()` reflect the new value and the `writeTo()` 
round trip serializes it.
   - `./gradlew :iceberg-core:test --tests 
"org.apache.iceberg.variants.TestShreddedObject"` — 23 tests passed.
   - `./gradlew :iceberg-core:check` — spotlessCheck, checkstyleMain/Test/Jmh 
passed; full test suite timed out in CI session (large module), covered by the 
targeted test above instead.
   - `./gradlew :iceberg-core:revapi` — passed (backward compatible, no 
signature change).
   
   
   


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