from typing import Dict, Union

from typing_extensions import Literal

from graph.ingestion.dataiku.data_types import DataikuDataType

KuzuDataType = Union[
    Literal["STRING"],
    Literal["BOOLEAN"],
    Literal["TIMESTAMP"],
    Literal["INT8"],
    Literal["INT16"],
    Literal["INT32"],
    Literal["INT64"],
    Literal["FLOAT"],
    Literal["DOUBLE"],
]

TYPE_MAPPING_DATAIKU_KUZU: Dict[DataikuDataType, KuzuDataType] = {
    "object": "STRING",
    "string": "STRING",
    "boolean": "BOOLEAN",
    "date": "TIMESTAMP",
    "tinyint": "INT8",
    "smallint": "INT16",
    "int": "INT32",
    "bigint": "INT64",
    "float": "FLOAT",
    "double": "DOUBLE",
}
