Class: ArrowFormat::DayTimeIntervalArray
- Inherits:
-
IntervalArray
- Object
- Array
- PrimitiveArray
- TemporalArray
- IntervalArray
- ArrowFormat::DayTimeIntervalArray
- Defined in:
- lib/arrow-format/array.rb
Instance Attribute Summary
Attributes inherited from Array
#offset, #size, #type, #validity_buffer
Instance Method Summary collapse
Methods inherited from PrimitiveArray
Methods inherited from Array
#empty?, #initialize, #n_nulls, #null?, #slice, #valid?
Constructor Details
This class inherits a constructor from ArrowFormat::PrimitiveArray
Instance Method Details
#to_a ⇒ Object
351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/arrow-format/array.rb', line 351 def to_a return [] if empty? offset = element_size * @offset values = @values_buffer. each(@type.buffer_type, offset, @size * 2). each_slice(2). collect do |(_, day), (_, time)| [day, time] end apply_validity(values) end |