class RPad(ValueOp): input_type = [ string, integer(name='length'), string(name='pad', optional=True) ] output_type = rules.shape_like_arg(0, 'string')
class Substring(ValueOp): input_type = [ string, integer(name='start'), integer(name='length', optional=True) ] output_type = rules.shape_like_arg(0, 'string')
class StringFind(ValueOp): input_type = [ string, string(name='substr'), integer(name='start', optional=True, default=None), integer(name='end', optional=True, default=None) ] output_type = rules.shape_like_arg(0, 'int64')
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 NotNull(UnaryOp): """ Returns true if values are not null Returns ------- notnull : boolean with dimension of caller """ output_type = rules.shape_like_arg(0, 'boolean')
class StringLength(UnaryOp): """ Compute length of strings Returns ------- length : int32 """ output_type = rules.shape_like_arg(0, 'int32')
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 StringUnaryOp(UnaryOp): input_type = [string] output_type = rules.shape_like_arg(0, 'string')
class RegexExtract(ValueOp): input_type = [string, string(name='pattern'), integer(name='index')] output_type = rules.shape_like_arg(0, 'string')
class RegexReplace(ValueOp): input_type = [string, string(name='pattern'), string(name='replacement')] output_type = rules.shape_like_arg(0, 'string')
class FindInSet(ValueOp): input_type = [string(name='needle'), list_of(string, min_length=1)] output_type = rules.shape_like_arg(0, 'int64')
class FuzzySearch(BooleanValueOp): input_type = [string, string(name='pattern')] output_type = rules.shape_like_arg(0, 'boolean')
class Translate(ValueOp): input_type = [string, string(name='from_str'), string(name='to_str')] output_type = rules.shape_like_arg(0, 'string')
class ExtractTimestampField(TimestampUnaryOp): output_type = rules.shape_like_arg(0, 'int32')
class Repeat(ValueOp): input_type = [string, integer(name='times')] output_type = rules.shape_like_arg(0, 'string')
class TimestampFromUNIX(ValueOp): input_type = [value, rules.string_options(['s', 'ms', 'us'], name='unit')] output_type = rules.shape_like_arg(0, 'timestamp')
class DecimalPrecision(DecimalUnaryOp): output_type = rules.shape_like_arg(0, 'int32')
class StrRight(ValueOp): input_type = [string, integer(name='nchars')] output_type = rules.shape_like_arg(0, 'string')
class DecimalScale(UnaryOp): output_type = rules.shape_like_arg(0, 'int32')
class Sign(UnaryOp): # This is the Impala output for both integers and double/float output_type = rules.shape_like_arg(0, 'float')
class RealUnaryOp(UnaryOp): input_type = [number] output_type = rules.shape_like_arg(0, 'double')
class TimestampDelta(ValueOp): input_type = [rules.timestamp, rules.timedelta(name='offset')] output_type = rules.shape_like_arg(0, 'timestamp')
class Hash(ValueOp): input_type = [value, rules.string_options(['fnv'], name='how')] output_type = rules.shape_like_arg(0, 'int64')
class StringAscii(UnaryOp): output_type = rules.shape_like_arg(0, 'int32')
class Sign(UnaryOp): output_type = rules.shape_like_arg(0, 'int32')