Class: SparkConnect::Types::DayTimeIntervalType

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

Constant Summary collapse

DAY =
0
HOUR =
1
MINUTE =
2
SECOND =
3

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataType

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

Constructor Details

#initialize(start_field = DAY, end_field = SECOND) ⇒ DayTimeIntervalType

Returns a new instance of DayTimeIntervalType.



218
219
220
221
222
# File 'lib/spark_connect/types.rb', line 218

def initialize(start_field = DAY, end_field = SECOND)
  super()
  @start_field = start_field
  @end_field = end_field
end

Instance Attribute Details

#end_fieldObject (readonly)

Returns the value of attribute end_field.



216
217
218
# File 'lib/spark_connect/types.rb', line 216

def end_field
  @end_field
end

#start_fieldObject (readonly)

Returns the value of attribute start_field.



216
217
218
# File 'lib/spark_connect/types.rb', line 216

def start_field
  @start_field
end

Instance Method Details

#simple_stringObject



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

def simple_string = "interval day to second"

#to_protoObject



227
228
229
# File 'lib/spark_connect/types.rb', line 227

def to_proto
  Types.wrap(day_time_interval: Proto::DataType::DayTimeInterval.new(start_field: start_field, end_field: end_field))
end

#type_nameObject



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

def type_name = "interval"