예제 #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`")
예제 #2
0
파일: test_udf.py 프로젝트: BabelTower/ibis
    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`")
예제 #3
0
 def _register_udf(self, inputs, output, name):
     func = api.scalar_function(inputs, output, name=name)
     func.register(name, 'ibis_testing')
     return func
예제 #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')"
예제 #5
0
 def _register_udf(self, inputs, output, name):
     func = api.scalar_function(inputs, output, name=name)
     func.register(name, 'ibis_testing')
     return func
예제 #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')"