| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package App::RecordStream::Aggregator::Concatenate; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = "4.0.25"; |
|
4
|
|
|
|
|
|
|
|
|
5
|
6
|
|
|
6
|
|
67424
|
use strict; |
|
|
6
|
|
|
|
|
19
|
|
|
|
6
|
|
|
|
|
183
|
|
|
6
|
6
|
|
|
6
|
|
27
|
use warnings; |
|
|
6
|
|
|
|
|
12
|
|
|
|
6
|
|
|
|
|
125
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
6
|
|
|
6
|
|
422
|
use App::RecordStream::Aggregator::MapReduce::Field; |
|
|
6
|
|
|
|
|
12
|
|
|
|
6
|
|
|
|
|
119
|
|
|
9
|
6
|
|
|
6
|
|
364
|
use App::RecordStream::Aggregator; |
|
|
6
|
|
|
|
|
14
|
|
|
|
6
|
|
|
|
|
131
|
|
|
10
|
6
|
|
|
6
|
|
463
|
use App::RecordStream::DomainLanguage::Registry; |
|
|
6
|
|
|
|
|
21
|
|
|
|
6
|
|
|
|
|
143
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
6
|
|
|
6
|
|
29
|
use base 'App::RecordStream::Aggregator::MapReduce::Field'; |
|
|
6
|
|
|
|
|
10
|
|
|
|
6
|
|
|
|
|
2527
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new |
|
15
|
|
|
|
|
|
|
{ |
|
16
|
1
|
|
|
1
|
0
|
81
|
my $class = shift; |
|
17
|
1
|
|
|
|
|
2
|
my $delim = shift; |
|
18
|
1
|
|
|
|
|
2
|
my $field = shift; |
|
19
|
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
12
|
my $this = $class->SUPER::new($field); |
|
21
|
1
|
|
|
|
|
8
|
$this->{'delim'} = $delim; |
|
22
|
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
3
|
return $this; |
|
24
|
|
|
|
|
|
|
} |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub new_from_valuation |
|
27
|
|
|
|
|
|
|
{ |
|
28
|
0
|
|
|
0
|
0
|
0
|
my $class = shift; |
|
29
|
0
|
|
|
|
|
0
|
my $delim = shift; |
|
30
|
0
|
|
|
|
|
0
|
my $valuation = shift; |
|
31
|
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
0
|
my $this = $class->SUPER::new_from_valuation($valuation); |
|
33
|
0
|
|
|
|
|
0
|
$this->{'delim'} = $delim; |
|
34
|
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
0
|
return $this; |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub map_field |
|
39
|
|
|
|
|
|
|
{ |
|
40
|
4
|
|
|
4
|
0
|
9
|
my ($this, $value) = @_; |
|
41
|
|
|
|
|
|
|
|
|
42
|
4
|
|
|
|
|
9
|
return [$value]; |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub reduce |
|
46
|
|
|
|
|
|
|
{ |
|
47
|
3
|
|
|
3
|
0
|
6
|
my ($this, $cookie, $cookie2) = @_; |
|
48
|
|
|
|
|
|
|
|
|
49
|
3
|
|
|
|
|
13
|
return [@$cookie, @$cookie2]; |
|
50
|
|
|
|
|
|
|
} |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub squish |
|
53
|
|
|
|
|
|
|
{ |
|
54
|
1
|
|
|
1
|
0
|
7
|
my ($this, $cookie) = @_; |
|
55
|
|
|
|
|
|
|
|
|
56
|
1
|
|
|
|
|
5
|
return join($this->{'delim'}, @$cookie); |
|
57
|
|
|
|
|
|
|
} |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub long_usage |
|
60
|
|
|
|
|
|
|
{ |
|
61
|
0
|
|
|
0
|
0
|
|
return <
|
|
62
|
|
|
|
|
|
|
Usage: concat,, |
|
63
|
|
|
|
|
|
|
Concatenate values from specified field. |
|
64
|
|
|
|
|
|
|
EOF |
|
65
|
|
|
|
|
|
|
} |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub short_usage |
|
68
|
|
|
|
|
|
|
{ |
|
69
|
0
|
|
|
0
|
0
|
|
return "concatenate values from provided field"; |
|
70
|
|
|
|
|
|
|
} |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub argct |
|
73
|
|
|
|
|
|
|
{ |
|
74
|
0
|
|
|
0
|
0
|
|
return 2; |
|
75
|
|
|
|
|
|
|
} |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
App::RecordStream::Aggregator->register_implementation('concatenate', __PACKAGE__); |
|
78
|
|
|
|
|
|
|
App::RecordStream::Aggregator->register_implementation('concat', __PACKAGE__); |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
App::RecordStream::DomainLanguage::Registry::register_vfn(__PACKAGE__, 'new_from_valuation', 'concatenate', 'SCALAR', 'VALUATION'); |
|
81
|
|
|
|
|
|
|
App::RecordStream::DomainLanguage::Registry::register_vfn(__PACKAGE__, 'new_from_valuation', 'concat', 'SCALAR', 'VALUATION'); |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
1; |