Class: Arrow::Slicer::NotInCondition

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

Instance Method Summary collapse

Methods inherited from Condition

#&, #^, #|

Constructor Details

#initialize(column, values) ⇒ NotInCondition

Returns a new instance of NotInCondition.



333
334
335
336
# File 'lib/arrow/slicer.rb', line 333

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

Instance Method Details

#!@Object



338
339
340
# File 'lib/arrow/slicer.rb', line 338

def !@
  InCondition.new(@column, @values)
end

#evaluateObject



342
343
344
345
346
347
348
# File 'lib/arrow/slicer.rb', line 342

def evaluate
  values = @values
  values = Array.new(values) unless values.is_a?(Array)
  options = SetLookupOptions.new(values)
  booleans = Function.find("is_in").execute([@column.data], options).value
  Function.find("invert").execute([booleans]).value
end