QuakeWang commented on code in PR #602:
URL: https://github.com/apache/paimon-rust/pull/602#discussion_r3642472534


##########
crates/paimon/src/table/table_write.rs:
##########
@@ -451,6 +456,102 @@ impl TableWrite {
         Ok(())
     }
 
+    fn validate_write_batch_schema(&self, batch: &RecordBatch) -> Result<()> {
+        let expected_schema = &self.write_schema;
+        let actual_schema = batch.schema();
+        let table_field_count = expected_schema.fields().len();
+        let actual_field_count = actual_schema.fields().len();
+        let allows_value_kind = self.changelog_producer == 
ChangelogProducer::Input;

Review Comment:
   `changelog-producer=input` is also permitted on cross-partition tables, so 
this condition accepts a caller-provided `_VALUE_KIND` in that mode. When a row 
moves partitions, the routing path appends a second `_VALUE_KIND` for the 
generated delete, causing a schema/column-count error in the KV writer. The new 
entry validation therefore still accepts a batch that fails downstream.



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