def _make_query(client, query, submission_type="Execute", udfs=None, settings=None, resources=[], wait=False, name=None, desc=None, local=True, is_parameterized=True, max=30.0, database='default', email_notify=False, **kwargs): """Wrapper around the real make_query""" res = make_query(client, query, submission_type, udfs, settings, resources, wait, name, desc, local, is_parameterized, max, database, email_notify, **kwargs) # Should be in the history if it's submitted. if submission_type == 'Execute': fragment = collapse_whitespace(smart_str(query[:20])) verify_history(client, fragment=fragment) return res
def _make_query(client, query, submission_type="Execute", follow=True, udfs=None, settings=None, resources=[], wait=False, name=None, desc=None, local=True, is_parameterized=True): """Wrapper around the real make_query""" res = make_query(client, query, submission_type, follow, udfs, settings, resources, wait, name, desc, local, is_parameterized) # Should be in the history if it's submitted. if submission_type == 'Execute': verify_history(client, fragment=collapse_whitespace(query[:20])) return res
def test_collapse_whitespace(): assert_equal("", collapse_whitespace("\t\n\n \n\t \n")) assert_equal("x", collapse_whitespace("\t\nx\n \n\t \n")) assert_equal("x y", collapse_whitespace("\t\nx\n \ny\t \n"))