Class: SparkConnect::Types::CharType
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from DataType
#hash, #inspect, #json, #to_s
Constructor Details
#initialize(length) ⇒ CharType
Returns a new instance of CharType.
182
183
184
185
|
# File 'lib/spark_connect/types.rb', line 182
def initialize(length)
super()
@length = length
end
|
Instance Attribute Details
#length ⇒ Object
Returns the value of attribute length.
180
181
182
|
# File 'lib/spark_connect/types.rb', line 180
def length
@length
end
|
Instance Method Details
#==(other) ⇒ Object
192
|
# File 'lib/spark_connect/types.rb', line 192
def ==(other) = other.is_a?(CharType) && other.length == length
|
#json_value ⇒ Object
189
|
# File 'lib/spark_connect/types.rb', line 189
def json_value = "char(#{length})"
|
#simple_string ⇒ Object
187
|
# File 'lib/spark_connect/types.rb', line 187
def simple_string = "char(#{length})"
|
#to_proto ⇒ Object
190
|
# File 'lib/spark_connect/types.rb', line 190
def to_proto = Types.wrap(char: Proto::DataType::Char.new(length: length))
|
#type_name ⇒ Object
188
|
# File 'lib/spark_connect/types.rb', line 188
def type_name = "char"
|