fn assert_checkpoint<S, F>(
        state: &S,
        f: &F,
        expected_files: &HashMap<DirsAndFileName, Arc<IoxParquetMetaData>>,
    ) where
        F: Fn(&S) -> CheckpointData,
    {
        let actual_files = f(state).files;

        let sorted_keys_actual = get_sorted_keys(&actual_files);
        let sorted_keys_expected = get_sorted_keys(expected_files);
        assert_eq!(sorted_keys_actual, sorted_keys_expected);

        for k in sorted_keys_actual {
            let md_actual = &actual_files[&k].metadata;
            let md_expected = &expected_files[&k];

            let iox_md_actual = md_actual.read_iox_metadata().unwrap();
            let iox_md_expected = md_expected.read_iox_metadata().unwrap();
            assert_eq!(iox_md_actual, iox_md_expected);

            let schema_actual = md_actual.read_schema().unwrap();
            let schema_expected = md_expected.read_schema().unwrap();
            assert_eq!(schema_actual, schema_expected);

            let stats_actual = md_actual.read_statistics(&schema_actual).unwrap();
            let stats_expected = md_expected.read_statistics(&schema_expected).unwrap();
            assert_eq!(stats_actual, stats_expected);
        }
    }
/// Assert that tracked files and their linked metadata are equal.
Assert that tracked files and their linked metadata are equal.
Assert that tracked files and their linked metadata are equal .
fn assert_checkpoint<S, F>(
        state: &S,
        f: &F,
        expected_files: &HashMap<DirsAndFileName, Arc<IoxParquetMetaData>>,
    ) where
        F: Fn(&S) -> CheckpointData,
    {
        let actual_files = f(state).files;
        let sorted_keys_actual = get_sorted_keys(&actual_files);
        let sorted_keys_expected = get_sorted_keys(expected_files);
        assert_eq!(sorted_keys_actual, sorted_keys_expected);
        for k in sorted_keys_actual {
            let md_actual = &actual_files[&k].metadata;
            let md_expected = &expected_files[&k];
            let iox_md_actual = md_actual.read_iox_metadata().unwrap();
            let iox_md_expected = md_expected.read_iox_metadata().unwrap();
            assert_eq!(iox_md_actual, iox_md_expected);
            let schema_actual = md_actual.read_schema().unwrap();
            let schema_expected = md_expected.read_schema().unwrap();
            assert_eq!(schema_actual, schema_expected);
            let stats_actual = md_actual.read_statistics(&schema_actual).unwrap();
            let stats_expected = md_expected.read_statistics(&schema_expected).unwrap();
            assert_eq!(stats_actual, stats_expected);
        }
    }
fn assert_checkpoint < S , F > ( state : & S , f : & F , expected_files : & HashMap < DirsAndFileName , Arc < IoxParquetMetaData > > , ) where F : Fn ( & S ) -> CheckpointData , { let actual_files = f ( state ) . files ; let sorted_keys_actual = get_sorted_keys ( & actual_files ) ; let sorted_keys_expected = get_sorted_keys ( expected_files ) ; assert_eq ! ( sorted_keys_actual sorted_keys_expected ) ; for k in sorted_keys_actual { let md_actual = & actual_files [ & k ] . metadata ; let md_expected = & expected_files [ & k ] ; let iox_md_actual = md_actual . read_iox_metadata ( ) . unwrap ( ) ; let iox_md_expected = md_expected . read_iox_metadata ( ) . unwrap ( ) ; assert_eq ! ( iox_md_actual iox_md_expected ) ; let schema_actual = md_actual . read_schema ( ) . unwrap ( ) ; let schema_expected = md_expected . read_schema ( ) . unwrap ( ) ; assert_eq ! ( schema_actual schema_expected ) ; let stats_actual = md_actual . read_statistics ( & schema_actual ) . unwrap ( ) ; let stats_expected = md_expected . read_statistics ( & schema_expected ) . unwrap ( ) ; assert_eq ! ( stats_actual stats_expected ) ; } }
Assert that tracked files and their linked metadata are equal.
Assert that tracked files and their linked metadata are equal .
state
&S
f
&F
expected_files
&HashMap<DirsAndFileName, Arc<IoxParquetMetaData>>
state
&S
f
&F
expected_files
&HashMap<DirsAndFileName, Arc<IoxParquetMetaData>>