Skip to content

Commit

Permalink
fix(query): Reverting the min max suffix replacement (#1757)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeep6189 committed Apr 10, 2024
1 parent d90473d commit 614af10
Showing 1 changed file with 1 addition and 5 deletions.
Expand Up @@ -67,7 +67,7 @@ final case class MultiSchemaPartitionsExec(queryContext: QueryContext,

/*
* As part of Histogram query compatibility with Prometheus format histograms, we
* remove _sum, _count, _min, _max suffix from metric name here. _bucket & le are already
* remove _sum, _count suffix from metric name here. _bucket & le are already
* removed in SingleClusterPlanner. We remove the suffix only when partition lookup does not return any results
*/
if (lookupRes.firstSchemaId.isEmpty && querySession.queryConfig.translatePromToFilodbHistogram &&
Expand All @@ -76,10 +76,6 @@ final case class MultiSchemaPartitionsExec(queryContext: QueryContext,
removeSuffixAndGenerateLookupResult(filters, metricName.get, "sum", source, querySession)
else if (metricName.get.endsWith("_count"))
removeSuffixAndGenerateLookupResult(filters, metricName.get, "count", source, querySession)
else if (metricName.get.endsWith("_min"))
removeSuffixAndGenerateLookupResult(filters, metricName.get, "min", source, querySession)
else if (metricName.get.endsWith("_max"))
removeSuffixAndGenerateLookupResult(filters, metricName.get, "max", source, querySession)
else (lookupRes, newColName)

lookupRes = res._1
Expand Down

0 comments on commit 614af10

Please sign in to comment.