Class: Spark::Command::Aggregate

Inherits:
Object
  • Object
show all
Defined in:
lib/spark/command/basic.rb

Overview


Aggregate

Direct Known Subclasses

Reduce

Instance Method Summary collapse

Instance Method Details

#lazy_run(iterator) ⇒ Object



214
215
216
# File 'lib/spark/command/basic.rb', line 214

def lazy_run(iterator, *)
  run(iterator)
end

#run(iterator) ⇒ Object



210
211
212
# File 'lib/spark/command/basic.rb', line 210

def run(iterator, *)
  [iterator.reduce(@zero_value, &@reduce_func)]
end