MCPcopy Create free account
hub / github.com/apache/impala / test_write_query

Function test_write_query

tests/comparison/tests/test_query_objects.py:84–93  ·  view source on GitHub ↗
(sql_writer, query_test)

Source from the content-addressed store, hash-verified

82 ids=_idfn)
83@pytest.mark.parametrize('sql_writer', ['IMPALA', 'POSTGRESQL'], indirect=True)
84def test_write_query(sql_writer, query_test):
85 if isinstance(sql_writer, ImpalaSqlWriter):
86 expected_string = getattr(query_test, 'impala_query_string')
87 elif isinstance(sql_writer, PostgresqlSqlWriter):
88 expected_string = getattr(query_test, 'postgres_query_string')
89 else:
90 raise Exception('unsupported writer: {0}'.format(sql_writer))
91 verify_sql_matches(
92 sql_writer.write_query(query_test.query),
93 expected_string)

Callers

nothing calls this directly

Calls 3

verify_sql_matchesFunction · 0.85
formatMethod · 0.45
write_queryMethod · 0.45

Tested by

no test coverage detected