Skip to content

Commit

Permalink
Druid: Query: Aggregation: TopN: fix threshold setter by ensuring par…
Browse files Browse the repository at this point in the history
…ticular interface __toString() call
  • Loading branch information
zitivapo committed Apr 4, 2017
1 parent 2f72d6e commit 8d61eb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Druid/Query/Aggregation/TopN.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function getDimension()
*/
public function setThreshold(ThresholdInterface $threshold)
{
$this->threshold = $threshold;
$this->threshold = (int)(string)$threshold;
return $this;
}

Expand All @@ -104,7 +104,7 @@ public function setMetric(MetricInterface $metric)
*/
public function getThreshold()
{
return (int)(string)$this->threshold;
return (int)$this->threshold;
}

/**
Expand Down

0 comments on commit 8d61eb9

Please sign in to comment.