Class: Arrow::Slicer::EqualCondition

Inherits:
Condition
  • Object
show all
Defined in:
lib/arrow/slicer.rb

Instance Method Summary collapse

Methods inherited from Condition

#&, #^, #|

Constructor Details

#initialize(column, value) ⇒ EqualCondition

Returns a new instance of EqualCondition.



217
218
219
220
# File 'lib/arrow/slicer.rb', line 217

def initialize(column, value)
  @column = column
  @value = value
end

Instance Method Details

#!@Object



222
223
224
# File 'lib/arrow/slicer.rb', line 222

def !@
  NotEqualCondition.new(@column, @value)
end

#evaluateObject



226
227
228
229
230
231
232
# File 'lib/arrow/slicer.rb', line 226

def evaluate
  if @value.nil?
    Function.find("is_null").execute([@column.data]).value
  else
    Function.find("equal").execute([@column.data, @value]).value
  end
end