Class: SparkConnect::Types::VarcharType
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from DataType
#hash, #inspect, #json, #to_s
Constructor Details
Returns a new instance of VarcharType.
198
199
200
201
|
# File 'lib/spark_connect/types.rb', line 198
def initialize(length)
super()
@length = length
end
|
Instance Attribute Details
#length ⇒ Object
Returns the value of attribute length.
196
197
198
|
# File 'lib/spark_connect/types.rb', line 196
def length
@length
end
|
Instance Method Details
#==(other) ⇒ Object
208
|
# File 'lib/spark_connect/types.rb', line 208
def ==(other) = other.is_a?(VarcharType) && other.length == length
|
#json_value ⇒ Object
205
|
# File 'lib/spark_connect/types.rb', line 205
def json_value = "varchar(#{length})"
|
#simple_string ⇒ Object
203
|
# File 'lib/spark_connect/types.rb', line 203
def simple_string = "varchar(#{length})"
|
#to_proto ⇒ Object
206
|
# File 'lib/spark_connect/types.rb', line 206
def to_proto = Types.wrap(var_char: Proto::DataType::VarChar.new(length: length))
|
#type_name ⇒ Object
204
|
# File 'lib/spark_connect/types.rb', line 204
def type_name = "varchar"
|