line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::RecordStream::Aggregator::Concatenate; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = "4.0.23"; |
4
|
|
|
|
|
|
|
|
5
|
6
|
|
|
6
|
|
25449
|
use strict; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
143
|
|
6
|
6
|
|
|
6
|
|
29
|
use warnings; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
194
|
|
7
|
|
|
|
|
|
|
|
8
|
6
|
|
|
6
|
|
414
|
use App::RecordStream::Aggregator::MapReduce::Field; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
162
|
|
9
|
6
|
|
|
6
|
|
343
|
use App::RecordStream::Aggregator; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
108
|
|
10
|
6
|
|
|
6
|
|
476
|
use App::RecordStream::DomainLanguage::Registry; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
117
|
|
11
|
|
|
|
|
|
|
|
12
|
6
|
|
|
6
|
|
29
|
use base 'App::RecordStream::Aggregator::MapReduce::Field'; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
1737
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new |
15
|
|
|
|
|
|
|
{ |
16
|
1
|
|
|
1
|
0
|
13
|
my $class = shift; |
17
|
1
|
|
|
|
|
2
|
my $delim = shift; |
18
|
1
|
|
|
|
|
2
|
my $field = shift; |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
9
|
my $this = $class->SUPER::new($field); |
21
|
1
|
|
|
|
|
7
|
$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
|
10
|
my ($this, $value) = @_; |
41
|
|
|
|
|
|
|
|
42
|
4
|
|
|
|
|
13
|
return [$value]; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub reduce |
46
|
|
|
|
|
|
|
{ |
47
|
3
|
|
|
3
|
0
|
6
|
my ($this, $cookie, $cookie2) = @_; |
48
|
|
|
|
|
|
|
|
49
|
3
|
|
|
|
|
14
|
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; |