blib/lib/Druid/Query/TopN.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 18 CC 1 SCAR 6.9
CC
1
Cov
0%
query_type
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Druid::Query::TopN;
2 use Moo;
3  
4 extends 'Druid::Query';
5 use Hash::Merge qw( merge );
6  
7 sub query_type { 'topN' }
8  
9 around 'gen_query' => sub {
10 my $orig = shift;
11 my $self = shift;
12 my $request_hash = $self->$orig(@_);
13  
14 my %topn_request_hash = (
15 'dimension' => $self->{_dimension},
16 'threshold' => $self->{_threshold},
17 'metric' => $self->{_metric},
18 );
19  
20 return merge($request_hash, \%topn_request_hash);
21  
22 };
23  
24 1;