예제 #1
0
class BaseConvert(ValueOp):

    input_type = [
        rules.one_of([integer, string]),
        integer(name='from_base'),
        integer(name='to_base')
    ]
    output_type = rules.shape_like_flatargs('string')
예제 #2
0
파일: udf.py 프로젝트: zuxfoucault/ibis
def _operation_type_conversion(inputs, output):
    in_type = [validate_type(x) for x in inputs]
    in_values = [rules.value_typed_as(_convert_types(x)) for x in in_type]
    out_type = validate_type(output)
    out_value = rules.shape_like_flatargs(out_type)
    return (in_values, out_value)
예제 #3
0
class StringJoin(ValueOp):

    input_type = [string(name='sep'), list_of(string, min_length=1)]
    output_type = rules.shape_like_flatargs('string')
예제 #4
0
 def _type_signature(self, inputs, output):
     input_type = _to_input_sig(inputs)
     output = validate_type(output)
     output_type = rules.shape_like_flatargs(output)
     return input_type, output_type
예제 #5
0
파일: udf.py 프로젝트: mahantheshhv/ibis
 def _type_signature(self, inputs, output):
     input_type = _to_input_sig(inputs)
     output = validate_type(output)
     output_type = rules.shape_like_flatargs(output)
     return input_type, output_type
예제 #6
0
파일: udf.py 프로젝트: megvuyyuru/ibis
def _operation_type_conversion(inputs, output):
    in_type = [ir._validate_type(x) for x in inputs]
    in_values = [rules.value_typed_as(_convert_types(x)) for x in in_type]
    out_type = ir._validate_type(output)
    out_value = rules.shape_like_flatargs(out_type)
    return (in_values, out_value)