Esempio 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`")
Esempio 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`")
Esempio 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
Esempio 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')"
Esempio 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
Esempio 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')"