MCPcopy Create free account
hub / github.com/apache/datafusion / assert_partitioned_files

Function assert_partitioned_files

datafusion/datasource/src/file_groups.rs:1205–1219  ·  view source on GitHub ↗

Asserts that the two groups of [`PartitionedFile`] are the same (PartitionedFile doesn't implement PartialEq)

(
        expected: Option<Vec<FileGroup>>,
        actual: Option<Vec<FileGroup>>,
    )

Source from the content-addressed store, hash-verified

1203 /// Asserts that the two groups of [`PartitionedFile`] are the same
1204 /// (PartitionedFile doesn't implement PartialEq)
1205 fn assert_partitioned_files(
1206 expected: Option<Vec<FileGroup>>,
1207 actual: Option<Vec<FileGroup>>,
1208 ) {
1209 match (expected, actual) {
1210 (None, None) => {}
1211 (Some(_), None) => panic!("Expected Some, got None"),
1212 (None, Some(_)) => panic!("Expected None, got Some"),
1213 (Some(expected), Some(actual)) => {
1214 let expected_string = format!("{expected:#?}");
1215 let actual_string = format!("{actual:#?}");
1216 assert_eq!(expected_string, actual_string);
1217 }
1218 }
1219 }
1220
1221 /// returns a partitioned file with the specified path and size
1222 fn pfile(path: impl Into<String>, file_size: u64) -> PartitionedFile {

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…