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 @@ -58,7 +58,11 @@
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.BiFunction;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -384,23 +388,64 @@ private static Test.TestResult createNewOutput(Path output, QueryPlan<?> plan) t
if (output.toString().contains("extra")) {
throw new IllegalStateException("Extra output files should not be created automatically:" + output);
}
Files.writeString(output, toString(plan), StandardCharsets.UTF_8);
String full = plan.toString(Node.NodeStringFormat.FULL);
Files.writeString(output, normalizeNameIds(normalizeSyntheticNames(full)), StandardCharsets.UTF_8);
return Test.TestResult.CREATED;
}

private static String toString(Node<?> plan) {
String planString = plan.toString(Node.NodeStringFormat.FULL);
String withoutSyntheticPatterns = SYNTHETIC_PATTERN.matcher(planString).replaceAll("\\$\\$$1");
return IDENTIFIER_PATTERN.matcher(withoutSyntheticPatterns).replaceAll("");
/**
* Rewrites node IDs ({@code #n}) in the plan string to a stable numbering by order of first appearance.
* Actual IDs assigned during plan building can vary between runs, so this is needed to keep golden output deterministic.
*/
private static String normalizeNameIds(String planString) {
return replaceMatches(planString, IDENTIFIER_PATTERN, (matcher, idMap) -> {
int originalId = Integer.parseInt(matcher.group().substring(1)); // Drop the initial '#' prefix
return "#" + idMap.getId(originalId);
});
}

/**
* Normalizes synthetic attribute names of the form $$something($something)* that are followed by # (node id).
* Replaces them with $$firstSegment$runningInt so golden output is stable across runs.
*/
private static String normalizeSyntheticNames(String full) {
return replaceMatches(full, SYNTHETIC_PATTERN, (matcher, idMap) -> {
String firstSegment = matcher.group(1);
return "$$" + firstSegment + "$" + idMap.getId(firstSegment);
});
}

private static <K> String replaceMatches(String input, Pattern pattern, BiFunction<Matcher, IdMap<K>, String> replacer) {
var idMap = new IdMap<K>();
Matcher matcher = pattern.matcher(input);
StringBuilder sb = new StringBuilder();
int lastEnd = 0;
while (matcher.find()) {
sb.append(input, lastEnd, matcher.start());
sb.append(replacer.apply(matcher, idMap));
lastEnd = matcher.end();
}
sb.append(input, lastEnd, input.length());
return sb.toString();
}

// Matches synthetic names like $$alias$1$2#3, since those $digits are generated during the test run and may differ each time. The
// #digit are removed by the next pattern.
private static final Pattern SYNTHETIC_PATTERN = Pattern.compile("\\$\\$([^$\\s]+)(\\$\\d+)*(?=[{#])");
private static final Pattern SYNTHETIC_PATTERN = Pattern.compile("\\$\\$([^$\\s]+)(\\$\\d+)+(?=[{#])");
private static final Pattern IDENTIFIER_PATTERN = Pattern.compile("#\\d+");

private static class IdMap<K> {
private final Map<K, Integer> map = new HashMap<>();
private int counter = 0;

public int getId(K key) {
return map.computeIfAbsent(key, k -> counter++);
}
}

private static Test.TestResult verifyExisting(Path output, QueryPlan<?> plan) throws IOException {
String testString = normalize(toString(plan));
String full = plan.toString(Node.NodeStringFormat.FULL);
String testString = normalize(normalizeNameIds(normalizeSyntheticNames(full)));
if (testString.equals(normalize(Files.readString(output)))) {
if (System.getProperty("golden.cleanactual") != null) {
Path path = actualPath(output);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
LimitExec[1000[INTEGER],null]
\_AggregateExec[[x{r}],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*), x{r}],SINGLE,[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],null]
\_EvalExec[[BUCKET(date{r},P1D[DATE_PERIOD]) AS x]]
\_MergeExec[[date{r}]]
|_ProjectExec[[date{f}]]
\_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],SINGLE,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null]
\_EvalExec[[BUCKET(date{r}#4,P1D[DATE_PERIOD]) AS x#0]]
\_MergeExec[[date{r}#4]]
|_ProjectExec[[date{f}#5]]
| \_LimitExec[1000[INTEGER],null]
| \_ExchangeExec[[date{f}],false]
| \_ProjectExec[[date{f}]]
| \_FieldExtractExec[date{f}]<[],[]>
| \_EsQueryExec[all_types], indexMode[standard], [_doc{f}], limit[1000], sort[] estimatedRowSize[12] queryBuilderAndTags [[QueryBuilderAndTags[query={
| \_ExchangeExec[[date{f}#5],false]
| \_ProjectExec[[date{f}#5]]
| \_FieldExtractExec[date{f}#5]<[],[]>
| \_EsQueryExec[all_types], indexMode[standard], [_doc{f}#6], limit[1000], sort[] estimatedRowSize[12] queryBuilderAndTags [[QueryBuilderAndTags[query={
"esql_single_value" : {
"field" : "integer",
"next" : {
Expand All @@ -21,12 +21,12 @@ LimitExec[1000[INTEGER],null]
"source" : "integer > 100@2:15"
}
}, tags=[]]]]
\_ProjectExec[[date{f}]]
\_ProjectExec[[date{f}#7]]
\_LimitExec[1000[INTEGER],null]
\_ExchangeExec[[date{f}],false]
\_ProjectExec[[date{f}]]
\_FieldExtractExec[date{f}]<[],[]>
\_EsQueryExec[all_types], indexMode[standard], [_doc{f}], limit[1000], sort[] estimatedRowSize[12] queryBuilderAndTags [[QueryBuilderAndTags[query={
\_ExchangeExec[[date{f}#7],false]
\_ProjectExec[[date{f}#7]]
\_FieldExtractExec[date{f}#7]<[],[]>
\_EsQueryExec[all_types], indexMode[standard], [_doc{f}#8], limit[1000], sort[] estimatedRowSize[12] queryBuilderAndTags [[QueryBuilderAndTags[query={
"match" : {
"keyword" : {
"query" : "keyword",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
LimitExec[1000[INTEGER],null]
\_AggregateExec[[x{r}],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*), x{r}],SINGLE,[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],null]
\_EvalExec[[DATETRUNC(P1D[DATE_PERIOD],date{r}) AS x]]
\_MergeExec[[date{r}]]
|_ProjectExec[[date{f}]]
\_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],SINGLE,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null]
\_EvalExec[[DATETRUNC(P1D[DATE_PERIOD],date{r}#4) AS x#0]]
\_MergeExec[[date{r}#4]]
|_ProjectExec[[date{f}#5]]
| \_LimitExec[1000[INTEGER],null]
| \_ExchangeExec[[date{f}],false]
| \_ProjectExec[[date{f}]]
| \_FieldExtractExec[date{f}]<[],[]>
| \_EsQueryExec[all_types], indexMode[standard], [_doc{f}], limit[1000], sort[] estimatedRowSize[12] queryBuilderAndTags [[QueryBuilderAndTags[query={
| \_ExchangeExec[[date{f}#5],false]
| \_ProjectExec[[date{f}#5]]
| \_FieldExtractExec[date{f}#5]<[],[]>
| \_EsQueryExec[all_types], indexMode[standard], [_doc{f}#6], limit[1000], sort[] estimatedRowSize[12] queryBuilderAndTags [[QueryBuilderAndTags[query={
"esql_single_value" : {
"field" : "integer",
"next" : {
Expand All @@ -21,12 +21,12 @@ LimitExec[1000[INTEGER],null]
"source" : "integer > 100@2:15"
}
}, tags=[]]]]
\_ProjectExec[[date{f}]]
\_ProjectExec[[date{f}#7]]
\_LimitExec[1000[INTEGER],null]
\_ExchangeExec[[date{f}],false]
\_ProjectExec[[date{f}]]
\_FieldExtractExec[date{f}]<[],[]>
\_EsQueryExec[all_types], indexMode[standard], [_doc{f}], limit[1000], sort[] estimatedRowSize[12] queryBuilderAndTags [[QueryBuilderAndTags[query={
\_ExchangeExec[[date{f}#7],false]
\_ProjectExec[[date{f}#7]]
\_FieldExtractExec[date{f}#7]<[],[]>
\_EsQueryExec[all_types], indexMode[standard], [_doc{f}#8], limit[1000], sort[] estimatedRowSize[12] queryBuilderAndTags [[QueryBuilderAndTags[query={
"match" : {
"keyword" : {
"query" : "keyword",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
LimitExec[1000[INTEGER],null]
\_AggregateExec[[x{r}],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*), x{r}],SINGLE,[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],null]
\_EvalExec[[ROUNDTO(date{r},1697760000000[DATETIME],1697846400000[DATETIME],1697932800000[DATETIME],1698019200000[DATETIME]) AS x]]
\_MergeExec[[date{r}]]
|_ProjectExec[[date{f}]]
\_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],SINGLE,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null]
\_EvalExec[[ROUNDTO(date{r}#4,1697760000000[DATETIME],1697846400000[DATETIME],1697932800000[DATETIME],1698019200000[DATETIME]) AS x#0]]
\_MergeExec[[date{r}#4]]
|_ProjectExec[[date{f}#5]]
| \_LimitExec[1000[INTEGER],null]
| \_ExchangeExec[[date{f}],false]
| \_ProjectExec[[date{f}]]
| \_FieldExtractExec[date{f}]<[],[]>
| \_EsQueryExec[all_types], indexMode[standard], [_doc{f}], limit[1000], sort[] estimatedRowSize[12] queryBuilderAndTags [[QueryBuilderAndTags[query={
| \_ExchangeExec[[date{f}#5],false]
| \_ProjectExec[[date{f}#5]]
| \_FieldExtractExec[date{f}#5]<[],[]>
| \_EsQueryExec[all_types], indexMode[standard], [_doc{f}#6], limit[1000], sort[] estimatedRowSize[12] queryBuilderAndTags [[QueryBuilderAndTags[query={
"esql_single_value" : {
"field" : "integer",
"next" : {
Expand All @@ -21,12 +21,12 @@ LimitExec[1000[INTEGER],null]
"source" : "integer > 100@2:15"
}
}, tags=[]]]]
\_ProjectExec[[date{f}]]
\_ProjectExec[[date{f}#7]]
\_LimitExec[1000[INTEGER],null]
\_ExchangeExec[[date{f}],false]
\_ProjectExec[[date{f}]]
\_FieldExtractExec[date{f}]<[],[]>
\_EsQueryExec[all_types], indexMode[standard], [_doc{f}], limit[1000], sort[] estimatedRowSize[12] queryBuilderAndTags [[QueryBuilderAndTags[query={
\_ExchangeExec[[date{f}#7],false]
\_ProjectExec[[date{f}#7]]
\_FieldExtractExec[date{f}#7]<[],[]>
\_EsQueryExec[all_types], indexMode[standard], [_doc{f}#8], limit[1000], sort[] estimatedRowSize[12] queryBuilderAndTags [[QueryBuilderAndTags[query={
"match" : {
"keyword" : {
"query" : "keyword",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
LimitExec[1000[INTEGER],null]
\_AggregateExec[[x{r}],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*), x{r}],FINAL,[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],null]
\_ExchangeExec[[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],true]
\_AggregateExec[[x{r}],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*), x{r}],INITIAL,[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],16]
\_EvalExec[[ROUNDTO(date{f},1697760000000[DATETIME],1697846400000[DATETIME],1697932800000[DATETIME],1698019200000[DATETIME]) AS x]]
\_FieldExtractExec[date{f}]<[],[]>
\_LookupJoinExec[[integer{f}],[language_code{f}],[],null]
|_FieldExtractExec[integer{f}]<[],[]>
| \_EsQueryExec[all_types], indexMode[standard], [_doc{f}], limit[], sort[] estimatedRowSize[24] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]]
\_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null]
\_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true]
\_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],INITIAL,[x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5],16]
\_EvalExec[[ROUNDTO(date{f}#6,1697760000000[DATETIME],1697846400000[DATETIME],1697932800000[DATETIME],1698019200000[DATETIME]) AS x#0]]
\_FieldExtractExec[date{f}#6]<[],[]>
\_LookupJoinExec[[integer{f}#7],[language_code{f}#8],[],null]
|_FieldExtractExec[integer{f}#7]<[],[]>
| \_EsQueryExec[all_types], indexMode[standard], [_doc{f}#9], limit[], sort[] estimatedRowSize[24] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]]
\_FragmentExec[filter=null, estimatedRowSize=0, reducer=[], fragment=[<>
EsRelation[languages_lookup][LOOKUP][language_code{f}]<>]]
EsRelation[languages_lookup][LOOKUP][language_code{f}#8]<>]]
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
LimitExec[1000[INTEGER],null]
\_AggregateExec[[x{r}],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*), x{r}],FINAL,[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],null]
\_ExchangeExec[[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],true]
\_AggregateExec[[x{r}],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*), x{r}],INITIAL,[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],16]
\_EvalExec[[ROUNDTO(date{f},1697760000000[DATETIME],1697846400000[DATETIME],1697932800000[DATETIME],1698019200000[DATETIME]) AS x]]
\_FieldExtractExec[date{f}]<[],[]>
\_LookupJoinExec[[integer{f}],[language_code{f}],[],null]
|_FieldExtractExec[integer{f}]<[],[]>
| \_EsQueryExec[all_types], indexMode[standard], [_doc{f}], limit[], sort[] estimatedRowSize[24] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]]
\_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null]
\_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true]
\_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],INITIAL,[x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5],16]
\_EvalExec[[ROUNDTO(date{f}#6,1697760000000[DATETIME],1697846400000[DATETIME],1697932800000[DATETIME],1698019200000[DATETIME]) AS x#0]]
\_FieldExtractExec[date{f}#6]<[],[]>
\_LookupJoinExec[[integer{f}#7],[language_code{f}#8],[],null]
|_FieldExtractExec[integer{f}#7]<[],[]>
| \_EsQueryExec[all_types], indexMode[standard], [_doc{f}#9], limit[], sort[] estimatedRowSize[24] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]]
\_FragmentExec[filter=null, estimatedRowSize=0, reducer=[], fragment=[<>
EsRelation[languages_lookup][LOOKUP][language_code{f}]<>]]
EsRelation[languages_lookup][LOOKUP][language_code{f}#8]<>]]
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
LimitExec[1000[INTEGER],null]
\_AggregateExec[[x{r}],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*), x{r}],FINAL,[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],null]
\_ExchangeExec[[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],true]
\_AggregateExec[[x{r}],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*), x{r}],INITIAL,[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],16]
\_EvalExec[[ROUNDTO(date{f},1697760000000[DATETIME],1697846400000[DATETIME],1697932800000[DATETIME],1698019200000[DATETIME]) AS x]]
\_FieldExtractExec[date{f}]<[],[]>
\_LookupJoinExec[[integer{f}],[language_code{f}],[],null]
|_FieldExtractExec[integer{f}]<[],[]>
| \_EsQueryExec[all_types], indexMode[standard], [_doc{f}], limit[], sort[] estimatedRowSize[24] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]]
\_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null]
\_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true]
\_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],INITIAL,[x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5],16]
\_EvalExec[[ROUNDTO(date{f}#6,1697760000000[DATETIME],1697846400000[DATETIME],1697932800000[DATETIME],1698019200000[DATETIME]) AS x#0]]
\_FieldExtractExec[date{f}#6]<[],[]>
\_LookupJoinExec[[integer{f}#7],[language_code{f}#8],[],null]
|_FieldExtractExec[integer{f}#7]<[],[]>
| \_EsQueryExec[all_types], indexMode[standard], [_doc{f}#9], limit[], sort[] estimatedRowSize[24] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]]
\_FragmentExec[filter=null, estimatedRowSize=0, reducer=[], fragment=[<>
EsRelation[languages_lookup][LOOKUP][language_code{f}]<>]]
EsRelation[languages_lookup][LOOKUP][language_code{f}#8]<>]]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
LimitExec[1000[INTEGER],null]
\_AggregateExec[[x{r}],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*), x{r}],FINAL,[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],null]
\_ExchangeExec[[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],true]
\_FilterExec[$$count(*)$count{r} > 0[LONG]]
\_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null]
\_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true]
\_FilterExec[$$count(*)$count{r}#4 > 0[LONG]]
\_EsStatsQueryExec[all_types], statsByStat{queryBuilderAndTags=[QueryBuilderAndTags[query={
"esql_single_value" : {
"field" : "date",
Expand Down Expand Up @@ -76,4 +76,4 @@ LimitExec[1000[INTEGER],null]
],
"boost" : 1.0
}
}, tags=[null]]]}], query[][x{r}, $$count(*)$count{r}, $$count(*)$seen{r}], limit[],
}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[],
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
LimitExec[1000[INTEGER],null]
\_AggregateExec[[x{r}],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*), x{r}],FINAL,[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],null]
\_ExchangeExec[[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],true]
\_FilterExec[$$count(*)$count{r} > 0[LONG]]
\_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null]
\_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true]
\_FilterExec[$$count(*)$count{r}#4 > 0[LONG]]
\_EsStatsQueryExec[all_types], statsByStat{queryBuilderAndTags=[QueryBuilderAndTags[query={
"esql_single_value" : {
"field" : "date",
Expand Down Expand Up @@ -76,4 +76,4 @@ LimitExec[1000[INTEGER],null]
],
"boost" : 1.0
}
}, tags=[null]]]}], query[][x{r}, $$count(*)$count{r}, $$count(*)$seen{r}], limit[],
}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[],
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
LimitExec[1000[INTEGER],null]
\_AggregateExec[[x{r}],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*), x{r}],FINAL,[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],null]
\_ExchangeExec[[x{r}, $$count(*)$count{r}, $$count(*)$seen{r}],true]
\_FilterExec[$$count(*)$count{r} > 0[LONG]]
\_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null]
\_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true]
\_FilterExec[$$count(*)$count{r}#4 > 0[LONG]]
\_EsStatsQueryExec[all_types], statsByStat{queryBuilderAndTags=[QueryBuilderAndTags[query={
"esql_single_value" : {
"field" : "date",
Expand Down Expand Up @@ -76,4 +76,4 @@ LimitExec[1000[INTEGER],null]
],
"boost" : 1.0
}
}, tags=[null]]]}], query[][x{r}, $$count(*)$count{r}, $$count(*)$seen{r}], limit[],
}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[],
Loading