Пример #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
    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')"