DEFAULT_CLIENT_DB_CONNECTION_TIMEOUT = 5

PERFORMANCE_TO_COLUMN = {
    "AVG_QUERY_TIME_MS": ("EXECUTION_TIME", "NUMERIC_MEAN"),
    "MAX_QUERY_TIME_MS": ("EXECUTION_TIME", "NUMERIC_MAX"),
    "AVG_CREDITS_USED_CLOUD_SERVICES": ("CREDITS_USED_CLOUD_SERVICES", "NUMERIC_MEAN"),
    "PERCENTAGE_OF_QUERIES_WITH_ERRORS": ("EXECUTION_STATIS", "PERCENTAGE_FAILURES"),
    "PERCENTAGE_OF_SELECTS_WITH_WAREHOUSE_XSMALL": (
        "QUERY_TYPE",
        "PERCENTAGE_WAREHOUSE_IS_XSMALL",
    ),
    "AVG_NUMBER_OF_ROWS_INSERTED_FOR_INSERT_QUERY": (
        "ROWS_INSERTED",
        "AVG_ROWS_INSERTED_OR_UPDATED",
    ),
    "AVG_BYTES_SPILLED_TO_LOCAL_STORAGE": (
        "BYTES_SPILLED_TO_LOCAL_STORAGE",
        "NUMERIC_MEAN",
    ),
    "AVG_BYTES_SPILLED_TO_REMOTE_STORAGE": (
        "BYTES_SPILLED_TO_REMOTE_STORAGE",
        "NUMERIC_MEAN",
    ),
    "PERCENTAGE_OF_EXPLORATORY_QUERIES": ("QUERY_TYPE", "PERCENTAGE_SELECTS"),
    "AVG_TOTAL_ELAPSED_TIME": ("TOTAL_ELAPSED_TIME", "AVERAGE_NON_NEGATIVE"),
    "MIN_TOTAL_ELAPSED_TIME": ("TOTAL_ELAPSED_TIME", "MIN_NON_NEGATIVE"),
    "MAX_TOTAL_ELAPSED_TIME": ("TOTAL_ELAPSED_TIME", "MAX_NON_NEGATIVE"),
    "AVG_SELECTION_QUERY_TIME_MS": ("TOTAL_ELAPSED_TIME", "AVG_SELECT_QUERY_TIME"),
}

COLUMN_TO_PERFORMANCE = {v: k for k, v in PERFORMANCE_TO_COLUMN.items()}


TEST_SQL_QUERY = "SELECT 1"
