'Testing query with udf'

def test_query_with_udf(self):

    execution_engines = get_available_execution_engines()
    for engine in execution_engines:
        response = _make_query(self.client, 'SELECT    my_sqrt(foo),    my_float(foo)    FROM    test    where    foo=4    GROUP    BY    foo', udfs=[('my_sqrt', 'org.apache.hadoop.hive.ql.udf.UDFSqrt'), ('my_float', 'org.apache.hadoop.hive.ql.udf.UDFToFloat')], local=False, database=self.db_name, settings=[('hive.execution.engine', engine)])
        response = wait_for_query_to_finish(self.client, response, max=60.0)
        content = fetch_query_result_data(self.client, response)
        assert_equal([2.0, 4.0], content['results'][0])
        log = content['log']
        assert_true(search_log_line('Completed    executing    command', log), log)
        assert_equal(1, len(parse_out_jobs(log, engine)), 'Should    have    started    1    job    and    extracted    it.')
