def test_sql_generation(self): func = api.scalar_function(['string'], 'string', name='Tester') func.register('identity', 'udf_testing') result = func('hello world') assert (ibis.impala.compile(result) == "SELECT udf_testing.identity('hello world') AS `tmp`")
def _register_udf(self, inputs, output, name): func = api.scalar_function(inputs, output, name=name) func.register(name, 'ibis_testing') return func