line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::RecordStream::Aggregator::MapReduce::Field; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = "4.0.24"; |
4
|
|
|
|
|
|
|
|
5
|
11
|
|
|
11
|
|
67
|
use strict; |
|
11
|
|
|
|
|
25
|
|
|
11
|
|
|
|
|
287
|
|
6
|
11
|
|
|
11
|
|
57
|
use warnings; |
|
11
|
|
|
|
|
21
|
|
|
11
|
|
|
|
|
281
|
|
7
|
|
|
|
|
|
|
|
8
|
11
|
|
|
11
|
|
2137
|
use App::RecordStream::Aggregator::MapReduce; |
|
11
|
|
|
|
|
45
|
|
|
11
|
|
|
|
|
259
|
|
9
|
11
|
|
|
11
|
|
1816
|
use App::RecordStream::DomainLanguage::Valuation::KeySpec; |
|
11
|
|
|
|
|
25
|
|
|
11
|
|
|
|
|
277
|
|
10
|
|
|
|
|
|
|
|
11
|
11
|
|
|
11
|
|
56
|
use base 'App::RecordStream::Aggregator::MapReduce'; |
|
11
|
|
|
|
|
24
|
|
|
11
|
|
|
|
|
2382
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new |
14
|
|
|
|
|
|
|
{ |
15
|
12
|
|
|
12
|
0
|
417
|
my $class = shift; |
16
|
12
|
|
|
|
|
32
|
my $field = shift; |
17
|
|
|
|
|
|
|
|
18
|
12
|
|
|
|
|
88
|
return new_from_valuation($class, App::RecordStream::DomainLanguage::Valuation::KeySpec->new($field)); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new_from_valuation |
22
|
|
|
|
|
|
|
{ |
23
|
37
|
|
|
37
|
0
|
106
|
my $class = shift; |
24
|
37
|
|
|
|
|
88
|
my $valuation = shift; |
25
|
|
|
|
|
|
|
|
26
|
37
|
|
|
|
|
115
|
my $this = |
27
|
|
|
|
|
|
|
{ |
28
|
|
|
|
|
|
|
'valuation' => $valuation, |
29
|
|
|
|
|
|
|
}; |
30
|
37
|
|
|
|
|
99
|
bless $this, $class; |
31
|
|
|
|
|
|
|
|
32
|
37
|
|
|
|
|
134
|
return $this; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub map |
36
|
|
|
|
|
|
|
{ |
37
|
98
|
|
|
98
|
0
|
231
|
my ($this, $record) = @_; |
38
|
|
|
|
|
|
|
|
39
|
98
|
50
|
|
|
|
342
|
if(!defined($this->{'valuation'})) |
40
|
|
|
|
|
|
|
{ |
41
|
|
|
|
|
|
|
# oopsie, consider missing/undef fields not to count and return the empty cookie |
42
|
0
|
|
|
|
|
0
|
return undef; |
43
|
|
|
|
|
|
|
} |
44
|
98
|
|
|
|
|
349
|
return $this->map_field($this->{'valuation'}->evaluate_record($record)); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub map_field |
48
|
|
|
|
|
|
|
{ |
49
|
65
|
|
|
65
|
0
|
183
|
my ($this, $value) = @_; |
50
|
|
|
|
|
|
|
|
51
|
65
|
|
|
|
|
188
|
return $value; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub argct |
55
|
|
|
|
|
|
|
{ |
56
|
5
|
|
|
5
|
0
|
18
|
return 1; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |