Class: SparkConnect::Types::StringType

Inherits:
DataType
  • Object
show all
Defined in:
lib/spark_connect/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataType

#==, #hash, #inspect, #json, #json_value, #simple_string, #to_s

Constructor Details

#initialize(collation = "UTF8_BINARY") ⇒ StringType

Returns a new instance of StringType.



122
123
124
125
# File 'lib/spark_connect/types.rb', line 122

def initialize(collation = "UTF8_BINARY")
  super()
  @collation = collation
end

Instance Attribute Details

#collationString (readonly)

Returns the collation name (default ‘“UTF8_BINARY”`).

Returns:

  • (String)

    the collation name (default ‘“UTF8_BINARY”`).



120
121
122
# File 'lib/spark_connect/types.rb', line 120

def collation
  @collation
end

Instance Method Details

#to_protoObject



128
# File 'lib/spark_connect/types.rb', line 128

def to_proto = Types.wrap(string: Proto::DataType::String.new(collation: @collation))

#type_nameObject



127
# File 'lib/spark_connect/types.rb', line 127

def type_name = "string"