You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ji...@apache.org on 2020/08/14 17:50:53 UTC
[incubator-pinot] branch anomaly-searcher-child created (now
d173efe)
This is an automated email from the ASF dual-hosted git repository.
jihao pushed a change to branch anomaly-searcher-child
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git.
at d173efe [TE] anomaly search - hide child anomaly unless queried with anomaly ids
This branch includes the following new commits:
new d173efe [TE] anomaly search - hide child anomaly unless queried with anomaly ids
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[incubator-pinot] 01/01: [TE] anomaly search - hide child anomaly
unless queried with anomaly ids
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jihao pushed a commit to branch anomaly-searcher-child
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
commit d173efe30472153fe7d65c52c86926a077ea765f
Author: Jihao Zhang <ji...@linkedin.com>
AuthorDate: Fri Aug 14 10:50:22 2020 -0700
[TE] anomaly search - hide child anomaly unless queried with anomaly ids
---
.../thirdeye/dashboard/resources/v2/anomalies/AnomalySearcher.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/dashboard/resources/v2/anomalies/AnomalySearcher.java b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/dashboard/resources/v2/anomalies/AnomalySearcher.java
index eeacbad..0403a97 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/dashboard/resources/v2/anomalies/AnomalySearcher.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/dashboard/resources/v2/anomalies/AnomalySearcher.java
@@ -70,7 +70,11 @@ public class AnomalySearcher {
* @return the result
*/
public Map<String, Object> search(AnomalySearchFilter searchFilter, int limit, int offset) {
- Predicate predicate = Predicate.EQ("child", false);
+ Predicate predicate = Predicate.NEQ("baseId", 0);
+ // hide child anomaly unless queried with ids
+ if (searchFilter.getAnomalyIds().isEmpty()) {
+ predicate = Predicate.EQ("child", false);
+ }
if (searchFilter.getStartTime() != null) {
predicate = Predicate.AND(predicate, Predicate.LT("startTime", searchFilter.getEndTime()));
}
@@ -152,5 +156,4 @@ public class AnomalySearcher {
}
return ImmutableMap.of("count", count, "limit", limit, "offset", offset, "elements", results);
}
-
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org