Fokko commented on code in PR #7778:
URL: https://github.com/apache/iceberg/pull/7778#discussion_r1220255517


##########
python/tests/utils/test_manifest.py:
##########
@@ -253,3 +265,14 @@ def test_read_manifest_v2(generated_manifest_file_file_v2: 
str) -> None:
     assert partition.contains_nan is False
     assert partition.lower_bound == b"\x01\x00\x00\x00"
     assert partition.upper_bound == b"\x02\x00\x00\x00"
+
+    entries = manifest_list.fetch_manifest_entry(io)

Review Comment:
   It creates a temporary directory:
   ```
   @pytest.fixture(scope="session")
   def generated_manifest_file_file_v2(
       avro_schema_manifest_file_v2: Dict[str, Any], 
generated_manifest_entry_file: str
   ) -> Generator[str, None, None]:
       from fastavro import parse_schema, writer
   
       parsed_schema = parse_schema(avro_schema_manifest_file_v2)
   
       # Make sure that a valid manifest_path is set
       manifest_file_records_v2[0]["manifest_path"] = 
generated_manifest_entry_file
   
       with TemporaryDirectory() as tmpdir:
           tmp_avro_file = tmpdir + "/manifest.avro"
           with open(tmp_avro_file, "wb") as out:
               writer(out, parsed_schema, manifest_file_records_v2)
           yield tmp_avro_file
   ```



##########
python/tests/utils/test_manifest.py:
##########
@@ -253,3 +265,14 @@ def test_read_manifest_v2(generated_manifest_file_file_v2: 
str) -> None:
     assert partition.contains_nan is False
     assert partition.lower_bound == b"\x01\x00\x00\x00"
     assert partition.upper_bound == b"\x02\x00\x00\x00"
+
+    entries = manifest_list.fetch_manifest_entry(io)

Review Comment:
   It creates a temporary directory:
   ```python
   @pytest.fixture(scope="session")
   def generated_manifest_file_file_v2(
       avro_schema_manifest_file_v2: Dict[str, Any], 
generated_manifest_entry_file: str
   ) -> Generator[str, None, None]:
       from fastavro import parse_schema, writer
   
       parsed_schema = parse_schema(avro_schema_manifest_file_v2)
   
       # Make sure that a valid manifest_path is set
       manifest_file_records_v2[0]["manifest_path"] = 
generated_manifest_entry_file
   
       with TemporaryDirectory() as tmpdir:
           tmp_avro_file = tmpdir + "/manifest.avro"
           with open(tmp_avro_file, "wb") as out:
               writer(out, parsed_schema, manifest_file_records_v2)
           yield tmp_avro_file
   ```



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