Пример #1
0
    def test_sql_generation(self):
        op = udf.scalar_function(['string'], 'string', name='Tester')
        udf.add_operation(op, 'identity', 'udf_testing')

        def _identity_test(value):
            return op(value).to_expr()
        result = _identity_test('hello world')
        assert result == "SELECT udf_testing.identity('hello world')"
Пример #2
0
    def test_sql_generation(self):
        op = udf.scalar_function(["string"], "string", name="Tester")
        udf.add_operation(op, "identity", "udf_testing")

        def _identity_test(value):
            return op(value).to_expr()

        result = _identity_test("hello world")
        assert result == "SELECT udf_testing.identity('hello world')"
Пример #3
0
 def _udf_registration(self, inputs, output, name):
     op = udf.scalar_function(inputs, output, name=name)
     assert issubclass(op, ValueOp)
     udf.add_operation(op, name, "ibis_testing")
     return op
Пример #4
0
 def _udf_registration(self, inputs, output, name):
     op = udf.scalar_function(inputs, output, name=name)
     assert issubclass(op, ValueOp)
     udf.add_operation(op, name, 'ibis_testing')
     return op