Class: SparkConnect::Types::DayTimeIntervalType
- Defined in:
- lib/spark_connect/types.rb
Constant Summary collapse
- DAY =
0- HOUR =
1- MINUTE =
2- SECOND =
3
Instance Attribute Summary collapse
-
#end_field ⇒ Object
readonly
Returns the value of attribute end_field.
-
#start_field ⇒ Object
readonly
Returns the value of attribute start_field.
Instance Method Summary collapse
-
#initialize(start_field = DAY, end_field = SECOND) ⇒ DayTimeIntervalType
constructor
A new instance of DayTimeIntervalType.
- #simple_string ⇒ Object
- #to_proto ⇒ Object
- #type_name ⇒ Object
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_field ⇒ Object (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_field ⇒ Object (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_string ⇒ Object
224 |
# File 'lib/spark_connect/types.rb', line 224 def simple_string = "interval day to second" |
#to_proto ⇒ Object
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_name ⇒ Object
225 |
# File 'lib/spark_connect/types.rb', line 225 def type_name = "interval" |