laskoviymishka opened a new pull request, #3231:
URL: https://github.com/apache/iceberg-rust/pull/3231

   ## Which issue does this PR close?
   
   Introduce the delta_writer module as the first building block for the 
DeltaWriter epic (#2218). Its record_ops::split_by_change_type takes a 
RecordBatch carrying the repo's _change_type column and splits it into separate 
insert and delete batches.
   
   The _change_type column is located by name (RESERVED_COL_NAME_CHANGE_TYPE), 
wherever it sits in the schema, and must be a non-nullable Utf8 column whose 
values are all one of the four spec change types. Following Java's 
BaseDeltaTaskWriter, INSERT and UPDATE_AFTER rows collapse to inserts while 
DELETE and UPDATE_BEFORE rows collapse to deletes. The _change_type column is 
stripped from both outputs, preserving each payload column's field-id metadata 
and the schema-level metadata; input row order is preserved within each side. 
Anything violating the contract (missing/mistyped/nullable/null/out-of-domain 
_change_type, or no payload columns) is rejected as DataInvalid.
   
   The module is pub(crate) since nothing wires it into a writer yet (that 
lands in a later PR of the epic).
   
   ## Are these changes tested?
   
   Newly added tests.


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