Class: Linkage::SingleThreadedRunner

Inherits:
Runner
  • Object
show all
Defined in:
lib/linkage/runner/single_threaded.rb

Overview

A runner class that only uses a single thread to execute a linkage.

See Also:

Instance Attribute Summary

Attributes inherited from Runner

#config, #result_set

Instance Method Summary collapse

Methods inherited from Runner

#initialize

Constructor Details

This class inherits a constructor from Linkage::Runner

Instance Method Details

#executeLinkage::ResultSet

Returns:



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/linkage/runner/single_threaded.rb', line 7

def execute
  result_set.create_tables!

  @pk_1 = config.dataset_1.field_set.primary_key.to_expr
  @pk_2 = config.dataset_2.field_set.primary_key.to_expr
  if config.has_simple_expectations?
    setup_datasets
    group_records

    if config.has_exhaustive_expectations?
      score_records_with_groups
    else
      create_matches
    end
  else
    dataset_1, dataset_2 = config.datasets_with_applied_exhaustive_expectations
    score_records_without_groups(dataset_1, dataset_2)
  end

  result_set.flush!
  return result_set
end