JingsongLi commented on code in PR #8376:
URL: https://github.com/apache/paimon/pull/8376#discussion_r3489334188


##########
paimon-python/pypaimon/manifest/manifest_file_manager.py:
##########
@@ -47,6 +47,8 @@ def __init__(self, table):
         self.partition_keys_fields = self.table.partition_keys_fields
         self.primary_keys_fields = self.table.primary_keys_fields
         self.trimmed_primary_keys_fields = 
self.table.trimmed_primary_keys_fields
+        from pypaimon.manifest import avro_codec
+        self._codec = avro_codec(table.options.manifest_compression())

Review Comment:
   This constructor now calls `table.options.manifest_compression()` 
unconditionally and passes the result through strict validation. Several 
existing streaming tests build a mock table whose 
`options.manifest_compression()` returns a `Mock`, so the PR currently fails 
before the scan can start with `ValueError: Unsupported manifest compression 
'<Mock ...>'`. This is also what the Python 3.10/3.11 CI failures show, and I 
can reproduce it with `python -m pytest 
pypaimon/tests/streaming_table_scan_test.py::AsyncStreamingTableScanTest::test_initial_scan
 -q`. Please either give the affected test mocks a real compression value, or 
make the codec lookup fall back to the default (`zstd`) when the option is 
absent/non-string so constructing manifest managers remains compatible with 
these mock tables.



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