Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,19 @@ NULL | NULL | NULL
;


histoAsCaseValue
required_capability: exponential_histogram_minmax_support

FROM exp_histo_sample
| INLINE STATS p50 = PERCENTILE(responseTime, 50) BY instance, @timestamp
| EVAL filteredHisto = CASE(p50 > 0.1, responseTime)
| INLINE STATS filteredMax = MAX(filteredHisto) BY instance, @timestamp //MAX is null if the histogram is null
| STATS filteredCount = COUNT(filteredMax)
;

filteredCount:long
3
;

ungroupedPercentiles
required_capability: exponential_histogram_percentiles_support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ ConditionEvaluatorSupplier toEvaluator(ToEvaluator toEvaluator) {
"keyword",
"long",
"unsigned_long",
"version" },
"version",
"exponential_histogram" },
description = """
Accepts pairs of conditions and values. The function returns the value that
belongs to the first condition that evaluates to `true`.
Expand Down Expand Up @@ -126,7 +127,8 @@ public Case(
"long",
"text",
"unsigned_long",
"version" },
"version",
"exponential_histogram" },
description = "The value that’s returned when the corresponding condition is the first to evaluate to `true`. "
+ "The default value is returned when no condition matches."
) List<Expression> rest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public class CaseTests extends AbstractScalarFunctionTestCase {
if (Build.current().isSnapshot()) {
t.addAll(
DataType.UNDER_CONSTRUCTION.stream()
.filter(type -> type != DataType.EXPONENTIAL_HISTOGRAM) // TODO(b/133393): implement
.filter(type -> type != DataType.AGGREGATE_METRIC_DOUBLE && type != DataType.DENSE_VECTOR)
.toList()
);
Expand Down