hareshkh commented on code in PR #54:
URL: https://github.com/apache/datafusion-iceberg/pull/54#discussion_r4247930194
##########
crates/datafusion/tests/integration_datafusion_test.rs:
##########
@@ -960,14 +973,41 @@ async fn test_insert_into_partitioned() -> Result<(),
Box<dyn Error>> {
"novel",
"textbook",
"shirt",
+ "coat",
+ ],
+ float_partition: PrimitiveArray<Float32>
+ [
+ 123.456,
+ 123.456,
+ NaN,
+ inf,
+ -inf,
+ null,
]"#]],
&[],
Some("id"),
);
- // Verify that data files exist under correct partition paths
+ // Verify all five partition files and six rows were committed.
let table_ident = TableIdent::new(namespace.clone(),
"partitioned_table".to_string());
let table = client.load_table(&table_ident).await?;
+
+ let snapshot = table.metadata().current_snapshot().unwrap();
+ let manifest_list = table.manifest_list_reader(snapshot).load().await?;
+ let mut file_count = 0;
+ let mut row_count = 0;
+ for entry in manifest_list.entries() {
+ let manifest = table.manifest_reader().read(entry).await?;
+ file_count += manifest.entries().len();
+ row_count += manifest
+ .entries()
+ .iter()
+ .map(|entry| entry.data_file().record_count())
+ .sum::<u64>();
+ }
+ assert_eq!(file_count, 5);
+ assert_eq!(row_count, 6);
Review Comment:
Enhanced the integration test with both suggestions - adding a double and
asserting partition values.
--
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]