from dataclasses import dataclass from typing import List, Optional from feast.types import ( Array, Bool, FeastType, Float32, Int32, Int64, UnixTimestamp, ) from tests.data.data_creator import create_basic_driver_dataset from tests.universal.feature_repos.universal.feature_views import driver_feature_view @dataclass(frozen=True, repr=True) class TypeTestConfig: feature_dtype: str feature_is_list: bool has_empty_list: bool def get_feast_type(feature_dtype: str, feature_is_list: bool) -> FeastType: dtype: Optional[FeastType] = None if feature_is_list is True: if feature_dtype == "int32": dtype = Array(Int32) elif feature_dtype == "int64": dtype = Array(Int64) elif feature_dtype == "float": dtype = Array(Float32) elif feature_dtype == "bool":