JingsongLi commented on code in PR #957:
URL: https://github.com/apache/paimon-rust/pull/957#discussion_r4203053293


##########
crates/paimon/src/table/table_write.rs:
##########
@@ -635,6 +635,35 @@ impl TableWrite {
                 self.table.schema().options(),
             )?;
         }
+        let config = PartialUpdateConfig::new(self.table.schema().options());
+        let batch = if config.is_enabled() && config.remove_record_on_delete() 
{

Review Comment:
   [P2] Limit kind normalization to primary-key tables
   
   This condition checks partial-update options but not whether the table has 
primary keys. `PartialUpdateConfig` and schema validation intentionally ignore 
these options on append tables, so a no-PK table with 
`merge-engine=partial-update`, `partial-update.remove-record-on-delete=true` 
and `file.format=row` is legal. I reproduced a two-INT-column append write: the 
new code adds `_VALUE_KIND`, then RowFormatWriter receives three Arrow fields 
and the original two table fields, failing with `.row writer expected 2 schema 
fields, got 3`. An exact baseline normalize_write_batch control successfully 
writes, commits and reads `(1,10)` for the same schema/options/input. Please 
require nonempty `primary_key_indices` before this normalization and add the 
append-table round-trip regression. PK delete/mixed-kind behavior should 
continue to use the normalization. A temporary PK-only guard makes all 84 
selected partial-update/append tests pass.



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