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
6 changes: 0 additions & 6 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,6 @@ tests:
- class: org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT
method: test
issue: https://github.com/elastic/elasticsearch/issues/133077
- class: org.elasticsearch.xpack.esql.action.RandomizedTimeSeriesIT
method: testGroupBySubset
issue: https://github.com/elastic/elasticsearch/issues/133220
- class: org.elasticsearch.xpack.kql.parser.KqlParserBooleanQueryTests
method: testParseOrQuery
issue: https://github.com/elastic/elasticsearch/issues/133863
Expand All @@ -513,9 +510,6 @@ tests:
- class: org.elasticsearch.xpack.ml.integration.ClassificationIT
method: testWithCustomFeatureProcessors
issue: https://github.com/elastic/elasticsearch/issues/134001
- class: org.elasticsearch.xpack.esql.action.RandomizedTimeSeriesIT
method: testRateGroupBySubset
issue: https://github.com/elastic/elasticsearch/issues/134019
- class: org.elasticsearch.cluster.ClusterInfoServiceIT
method: testMaxQueueLatenciesInClusterInfo
issue: https://github.com/elastic/elasticsearch/issues/134088
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,10 +550,16 @@ public void testGroupBySubset() {
} else {
assertThat(row.getFirst(), equalTo(docValues.isEmpty() ? null : docValues.getFirst().longValue()));
}
assertThat(row.get(1), equalTo(aggregatePerTimeseries(tsGroups, Agg.MAX, Agg.MAX)));
assertThat(row.get(2), equalTo(aggregatePerTimeseries(tsGroups, Agg.MIN, Agg.MIN)));
assertThat(row.get(3), equalTo(aggregatePerTimeseries(tsGroups, Agg.SUM, Agg.COUNT)));
assertThat(row.get(4), equalTo(aggregatePerTimeseries(tsGroups, Agg.SUM, Agg.SUM)));
Function<Object, Double> toDouble = cell -> switch (cell) {
case Long l -> l.doubleValue();
case Double d -> d;
case null -> null;
default -> throw new IllegalStateException("Unexpected value type: " + cell + " of class " + cell.getClass());
};
assertThat(toDouble.apply(row.get(1)), equalTo(aggregatePerTimeseries(tsGroups, Agg.MAX, Agg.MAX)));
assertThat(toDouble.apply(row.get(2)), equalTo(aggregatePerTimeseries(tsGroups, Agg.MIN, Agg.MIN)));
assertThat(toDouble.apply(row.get(3)), equalTo(aggregatePerTimeseries(tsGroups, Agg.SUM, Agg.COUNT)));
assertThat(toDouble.apply(row.get(4)), equalTo(aggregatePerTimeseries(tsGroups, Agg.SUM, Agg.SUM)));
var avg = (Double) aggregatePerTimeseries(tsGroups, Agg.AVG, Agg.AVG);
assertThat((Double) row.get(5), row.get(5) == null ? equalTo(null) : closeTo(avg, avg * 0.01));
// assertThat(row.get(6), equalTo(aggregatePerTimeseries(tsGroups, Agg.COUNT, Agg.COUNT).longValue()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private static Object randomDimensionValue(String dimensionName) {
this.numDocs = numDocs;
var maxAttributes = (int) Math.sqrt(numDocs);
List<String> tempAttributeSet = List.copyOf(
Set.copyOf(ESTestCase.randomList(1, maxAttributes, () -> ESTestCase.randomAlphaOfLengthBetween(2, 30)))
Set.copyOf(ESTestCase.randomList(1, maxAttributes, () -> ESTestCase.randomAlphaOfLengthBetween(3, 30)))
);
var maxTimeSeries = (int) Math.sqrt(numDocs);
var minTimeSeries = Math.max(1, maxTimeSeries / 4);
Expand Down