def METHOD_NAME(cls, config: Mapping[str, Any]) -> Mapping[str, Any]:
    """
    The legacy parquet parser converts decimal fields to numbers. This isn't desirable because it can lead to precision loss.
    To avoid introducing a breaking change with the new default, we will set decimal_as_float to True in the legacy configs.
    """
    filetype = config.get("filetype")
    if filetype != "parquet" and filetype != "avro":
        raise ValueError(
            f"Expected {filetype} format, got {config}. This is probably due to a CDK bug. Please reach out to the Airbyte team for support."
        )
    if config.get("decimal_as_float"):
        raise ValueError(
            f"Received legacy {filetype} file form with 'decimal_as_float' set. This is unexpected. Please reach out to the Airbyte team for support."
        )
    return {**config, **{"decimal_as_float": True}}