Пример #1
0
def test_get_text_clause_with_colon() -> None:
    """
    Make sure text clauses don't escape the colon character
    """

    from superset.db_engine_specs.athena import AthenaEngineSpec

    query = ("SELECT foo FROM tbl WHERE "
             "abc >= TIMESTAMP '2021-11-26T00\:00\:00.000000'")
    text_clause = AthenaEngineSpec.get_text_clause(query)
    assert text_clause.text == query
Пример #2
0
def test_get_text_clause_with_colon(app_context: AppContext) -> None:
    """
    Make sure text clauses don't escape the colon character
    """

    from superset.db_engine_specs.athena import AthenaEngineSpec

    query = ("SELECT foo FROM tbl WHERE "
             "abc >= from_iso8601_timestamp('2021-11-26T00\:00\:00.000000')")
    text_clause = AthenaEngineSpec.get_text_clause(query)
    assert text_clause.text == query