ZENOTME commented on code in PR #118:
URL: https://github.com/apache/iceberg-rust/pull/118#discussion_r1426184104


##########
crates/iceberg/src/spec/manifest_list.rs:
##########
@@ -931,55 +931,104 @@ mod test {
 
     use super::_serde::ManifestListV2;
 
-    #[test]
-    fn test_parse_manifest_list_v1() {
-        let path = format!(
-            "{}/testdata/simple_manifest_list_v1.avro",
-            env!("CARGO_MANIFEST_DIR")
+    #[tokio::test]
+    async fn test_parse_manifest_list_v1() {
+        let manifest_list = ManifestList {
+            entries: vec![
+                ManifestListEntry {
+                    manifest_path: 
"/opt/bitnami/spark/warehouse/db/table/metadata/10d28031-9739-484c-92db-cdf2975cead4-m0.avro".to_string(),
+                    manifest_length: 5806,
+                    partition_spec_id: 0,
+                    content: ManifestContentType::Data,
+                    sequence_number: 0,
+                    min_sequence_number: 0,
+                    added_snapshot_id: 1646658105718557341,
+                    added_data_files_count: Some(3),
+                    existing_data_files_count: Some(0),
+                    deleted_data_files_count: Some(0),
+                    added_rows_count: Some(3),
+                    existing_rows_count: Some(0),
+                    deleted_rows_count: Some(0),
+                    partitions: vec![],
+                    key_metadata: vec![],
+                }
+            ]
+        };
+
+        let file_io = FileIOBuilder::new_fs_io().build().unwrap();
+
+        let tmp_dir = TempDir::new().unwrap();
+        let file_name = "simple_manifest_list_v1.avro";
+        let full_path = format!("{}/{}", tmp_dir.path().to_str().unwrap(), 
file_name);
+
+        let mut writer = ManifestListWriter::v1(

Review Comment:
   I find that avro-tool can generate an avro file by schema file and data JSON 
file. 
https://www.michael-noll.com/blog/2013/03/17/reading-and-writing-avro-files-from-the-command-line/



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to