Module: Arrow::Slicer::Helper

Defined in:
lib/arrow/slicer.rb

Class Method Summary collapse

Class Method Details

.ensure_boolean(column) ⇒ Object



45
46
47
48
49
50
51
52
53
54
# File 'lib/arrow/slicer.rb', line 45

def ensure_boolean(column)
  case column.data_type
  when Arrow::BooleanDataType
    column.data
  else
    options = CastOptions.new
    options.to_data_type = Arrow::BooleanDataType.new
    Function.find("cast").execute([column.data], options).value
  end
end