check_metadata_with_storage_equal

Function check_metadata_with_storage_equal 

Source
pub fn check_metadata_with_storage_equal(
    actual: (&DataType, Option<&HashMap<String, String>>),
    expected: (&DataType, Option<&HashMap<String, String>>),
    what: &str,
    context: &str,
) -> Result<(), DataFusionError>
Expand description

Assert equality of data types where one or both sides may have field metadata

This currently compares absent metadata (e.g., one side was a DataType) and empty metadata (e.g., one side was a field where the field had no metadata) as equal and uses byte-for-byte comparison for the keys and values of the fields, even though this is potentially too strict for some cases (e.g., extension types where extension metadata is represented by JSON, or cases where field metadata is orthogonal to the interpretation of the data type).

Returns a planning error with suitably formatted type representations if actual and expected do not compare to equal.