Class: SparkConnect::Types::YearMonthIntervalType
- Defined in:
- lib/spark_connect/types.rb
Constant Summary collapse
- YEAR =
0- MONTH =
1
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 = YEAR, end_field = MONTH) ⇒ YearMonthIntervalType
constructor
A new instance of YearMonthIntervalType.
- #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 = YEAR, end_field = MONTH) ⇒ YearMonthIntervalType
Returns a new instance of YearMonthIntervalType.
237 238 239 240 241 |
# File 'lib/spark_connect/types.rb', line 237 def initialize(start_field = YEAR, end_field = MONTH) super() @start_field = start_field @end_field = end_field end |
Instance Attribute Details
#end_field ⇒ Object (readonly)
Returns the value of attribute end_field.
235 236 237 |
# File 'lib/spark_connect/types.rb', line 235 def end_field @end_field end |
#start_field ⇒ Object (readonly)
Returns the value of attribute start_field.
235 236 237 |
# File 'lib/spark_connect/types.rb', line 235 def start_field @start_field end |
Instance Method Details
#simple_string ⇒ Object
243 |
# File 'lib/spark_connect/types.rb', line 243 def simple_string = "interval year to month" |
#to_proto ⇒ Object
246 247 248 |
# File 'lib/spark_connect/types.rb', line 246 def to_proto Types.wrap(year_month_interval: Proto::DataType::YearMonthInterval.new(start_field: start_field, end_field: end_field)) end |
#type_name ⇒ Object
244 |
# File 'lib/spark_connect/types.rb', line 244 def type_name = "interval" |