/// Assert that set of parquet files tracked by a catalog are identical to the given sorted list.
Assert that set of parquet files tracked by a catalog are identical to the given sorted list.
Assert that set of parquet files tracked by a catalog are identical to the given sorted list .
fn assert_catalog_parquet_files(
        catalog: &PreservedCatalog<TestCatalogState>,
        expected: &[(String, ParquetMetaData)],
    ) {
        let actual = get_catalog_parquet_files(&catalog.state());
        for ((actual_path, actual_md), (expected_path, expected_md)) in
            actual.iter().zip(expected.iter())
        {
            assert_eq!(actual_path, expected_path);
            let actual_schema = read_schema_from_parquet_metadata(actual_md).unwrap();
            let expected_schema = read_schema_from_parquet_metadata(expected_md).unwrap();
            assert_eq!(actual_schema, expected_schema);
            // NOTE: the actual table name is not important here as long as it is the same for both calls, since it is
            // only used to generate out statistics struct (not to read / dispatch anything).
            let actual_stats =
                read_statistics_from_parquet_metadata(actual_md, &actual_schema, "foo").unwrap();
            let expected_stats =
                read_statistics_from_parquet_metadata(expected_md, &expected_schema, "foo")
                    .unwrap();
            assert_eq!(actual_stats, expected_stats);
        }
    }
fn assert_catalog_parquet_files ( catalog : & PreservedCatalog < TestCatalogState > , expected : & [ ( String , ParquetMetaData ) ] , ) { let actual = get_catalog_parquet_files ( & catalog . state ( ) ) ; for ( ( actual_path , actual_md ) , ( expected_path , expected_md ) ) in actual . iter ( ) . zip ( expected . iter ( ) ) { assert_eq ! ( actual_path expected_path ) ; let actual_schema = read_schema_from_parquet_metadata ( actual_md ) . unwrap ( ) ; let expected_schema = read_schema_from_parquet_metadata ( expected_md ) . unwrap ( ) ; assert_eq ! ( actual_schema expected_schema ) ; // NOTE: the actual table name is not important here as long as it is the same for both calls, since it is // only used to generate out statistics struct (not to read / dispatch anything). let actual_stats = read_statistics_from_parquet_metadata ( actual_md , & actual_schema , " " ) . unwrap ( ) ; let expected_stats = read_statistics_from_parquet_metadata ( expected_md , & expected_schema , " " ) . unwrap ( ) ; assert_eq ! ( actual_stats expected_stats ) ; } }
Assert that set of parquet files tracked by a catalog are identical to the given sorted list.
Assert that set of parquet files tracked by a catalog are identical to the given sorted list .
catalog
&PreservedCatalog<TestCatalogState>
expected
&[(String, ParquetMetaData)]