Ejemplo n.º 1
0
    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`")
Ejemplo n.º 2
0
    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`")
Ejemplo n.º 3
0
 def _register_udf(self, inputs, output, name):
     func = api.scalar_function(inputs, output, name=name)
     func.register(name, 'ibis_testing')
     return func
Ejemplo n.º 4
0
    def test_sql_generation(self):
        func = api.scalar_function(['string'], 'string', name='Tester')
        func.register('identity', 'udf_testing')

        result = func('hello world')
        assert result == "SELECT udf_testing.identity('hello world')"
Ejemplo n.º 5
0
 def _register_udf(self, inputs, output, name):
     func = api.scalar_function(inputs, output, name=name)
     func.register(name, 'ibis_testing')
     return func
Ejemplo n.º 6
0
    def test_sql_generation(self):
        func = api.scalar_function(['string'], 'string', name='Tester')
        func.register('identity', 'udf_testing')

        result = func('hello world')
        assert result == "SELECT udf_testing.identity('hello world')"