コード例 #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
ファイル: test_udf.py プロジェクト: mahantheshhv/ibis
    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
ファイル: test_udf.py プロジェクト: mahantheshhv/ibis
 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')"