leaves12138 commented on code in PR #10368:
URL: https://github.com/apache/paimon/pull/10368#discussion_r4176076656


##########
paimon-python/pypaimon/write/table_write.py:
##########
@@ -344,7 +347,8 @@ def _release_prepared_indexes(self) -> None:
 
     def _prepare_arrow_data(self, data):
         self._validate_pyarrow_schema(data.schema)
-        return normalize_arrow_strings(data)
+        from pypaimon.write.row_kind import filter_write_batch
+        return filter_write_batch(self.table, normalize_arrow_strings(data))

Review Comment:
   The new row-kind filtering is functionally covered, but this change 
currently breaks the Python 3.6 CI job. 
`ArrowSchemaTest.test_unsupported_nested_cast_fails_before_routing` constructs 
a `TableWrite` with `object.__new__` and intentionally provides only the 
schema/routing test doubles; `_prepare_arrow_data()` now unconditionally 
dereferences `self.table` here, so the test raises `AttributeError` before 
reaching the expected schema-cast error. Please preserve this existing 
test/compatibility path (for example, make the filter conditional on an 
initialized table or refactor the filter so schema-only `TableWrite` test 
doubles do not need `table`).



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