class Truncate(ValueOp): input_type = [ rules.timestamp, rules.string_options(_truncate_units, name='unit', validator=_truncate_unit_validate) ] output_type = rules.shape_like_arg(0, 'timestamp')
class MyOp(ops.Node): input_type = [ rules.string_options(options, case_sensitive=False, name='value') ] def __init__(self, value): super(MyOp, self).__init__([value]) def output_type(self): return MyExpr
class ParseURL(ValueOp): input_type = [ string, rules.string_options([ 'PROTOCOL', 'HOST', 'PATH', 'REF', 'AUTHORITY', 'FILE', 'USERINFO', 'QUERY' ], name='extract'), string(name='key', optional=True) ] output_type = rules.shape_like_arg(0, 'string')
class Hash(ValueOp): input_type = [value, rules.string_options(['fnv'], name='how')] output_type = rules.shape_like_arg(0, 'int64')
class TimestampFromUNIX(ValueOp): input_type = [value, rules.string_options(['s', 'ms', 'us'], name='unit')] output_type = rules.shape_like_arg(0, 'timestamp')