Skip to content

Commit 69a2d01

Browse files
committed
Merge remote-tracking branch 'origin/main' into issues/4636
Signed-off-by: Yuanchun Shen <yuanchu@amazon.com>
2 parents cb78ea7 + a7f238e commit 69a2d01

113 files changed

Lines changed: 596 additions & 501 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

core/src/main/java/org/opensearch/sql/calcite/plan/PPLAggGroupMergeRule.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import org.apache.calcite.plan.RelRule;
1616
import org.apache.calcite.rel.logical.LogicalAggregate;
1717
import org.apache.calcite.rel.logical.LogicalProject;
18+
import org.apache.calcite.rel.rules.SubstitutionRule;
1819
import org.apache.calcite.rex.RexCall;
1920
import org.apache.calcite.rex.RexInputRef;
2021
import org.apache.calcite.rex.RexNode;
@@ -27,6 +28,7 @@
2728
import org.apache.commons.lang3.tuple.Pair;
2829
import org.immutables.value.Value;
2930
import org.opensearch.sql.calcite.utils.CalciteUtils;
31+
import org.opensearch.sql.calcite.utils.PlanUtils;
3032

3133
/**
3234
* Planner rule that merge multiple agg group fields into a single one, on which all other group
@@ -41,7 +43,8 @@
4143
* these UDFs' output must have equivalent cardinality as `a`.
4244
*/
4345
@Value.Enclosing
44-
public class PPLAggGroupMergeRule extends RelRule<PPLAggGroupMergeRule.Config> {
46+
public class PPLAggGroupMergeRule extends RelRule<PPLAggGroupMergeRule.Config>
47+
implements SubstitutionRule {
4548

4649
/** Creates a OpenSearchAggregateConvertRule. */
4750
protected PPLAggGroupMergeRule(Config config) {
@@ -101,6 +104,7 @@ public void apply(RelOptRuleCall call, LogicalAggregate aggregate, LogicalProjec
101104
parentProjections.addAll(aggCallRefs);
102105
relBuilder.project(parentProjections);
103106
call.transformTo(relBuilder.build());
107+
PlanUtils.tryPruneRelNodes(call);
104108
}
105109

106110
/** Rule configuration. */

core/src/main/java/org/opensearch/sql/calcite/plan/PPLAggregateConvertRule.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import org.apache.calcite.rel.core.Project;
1818
import org.apache.calcite.rel.logical.LogicalAggregate;
1919
import org.apache.calcite.rel.logical.LogicalProject;
20+
import org.apache.calcite.rel.rules.SubstitutionRule;
2021
import org.apache.calcite.rex.RexBuilder;
2122
import org.apache.calcite.rex.RexCall;
2223
import org.apache.calcite.rex.RexInputRef;
@@ -28,6 +29,7 @@
2829
import org.apache.calcite.tools.RelBuilder;
2930
import org.apache.commons.lang3.tuple.Pair;
3031
import org.immutables.value.Value;
32+
import org.opensearch.sql.calcite.utils.PlanUtils;
3133

3234
/**
3335
* Planner rule that converts specific aggCall to a more efficient expressions, which includes:
@@ -45,8 +47,8 @@
4547
* <p>- AVG/MAX/MIN(FIELD [+|-|*|+|/] NUMBER) -> AVG/MAX/MIN(FIELD) [+|-|*|+|/] NUMBER
4648
*/
4749
@Value.Enclosing
48-
public class PPLAggregateConvertRule extends RelRule<PPLAggregateConvertRule.Config> {
49-
50+
public class PPLAggregateConvertRule extends RelRule<PPLAggregateConvertRule.Config>
51+
implements SubstitutionRule {
5052
/** Creates a OpenSearchAggregateConvertRule. */
5153
protected PPLAggregateConvertRule(Config config) {
5254
super(config);
@@ -97,6 +99,8 @@ public void apply(RelOptRuleCall call, LogicalAggregate aggregate, LogicalProjec
9799
return ref;
98100
})
99101
.toList();
102+
// Stop processing if there is no converted agg call args
103+
if (convertedAggCallArgs.isEmpty()) return;
100104
relBuilder.project(newChildProjects);
101105
RelNode newInput = relBuilder.peek();
102106

@@ -193,6 +197,7 @@ public void apply(RelOptRuleCall call, LogicalAggregate aggregate, LogicalProjec
193197
aliasMaybe(relBuilder, constructor.apply(relBuilder.peek()), name)));
194198
relBuilder.project(parentProjects);
195199
call.transformTo(relBuilder.build());
200+
PlanUtils.tryPruneRelNodes(call);
196201
}
197202

198203
interface OperatorConstructor {

core/src/main/java/org/opensearch/sql/calcite/utils/PlanUtils.java

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,23 @@
1414
import com.google.common.collect.ImmutableList;
1515
import java.lang.reflect.Method;
1616
import java.util.ArrayList;
17+
import java.util.Arrays;
1718
import java.util.HashSet;
1819
import java.util.List;
1920
import java.util.Objects;
2021
import java.util.Set;
22+
import java.util.function.Function;
2123
import java.util.function.Predicate;
2224
import java.util.stream.Collectors;
2325
import javax.annotation.Nullable;
26+
import org.apache.calcite.plan.Convention;
27+
import org.apache.calcite.plan.RelOptRuleCall;
2428
import org.apache.calcite.plan.RelOptTable;
29+
import org.apache.calcite.plan.volcano.VolcanoPlanner;
2530
import org.apache.calcite.rel.RelHomogeneousShuttle;
2631
import org.apache.calcite.rel.RelNode;
2732
import org.apache.calcite.rel.RelShuttle;
33+
import org.apache.calcite.rel.core.Aggregate;
2834
import org.apache.calcite.rel.core.AggregateCall;
2935
import org.apache.calcite.rel.core.Project;
3036
import org.apache.calcite.rel.core.Sort;
@@ -41,6 +47,7 @@
4147
import org.apache.calcite.rex.RexLiteral;
4248
import org.apache.calcite.rex.RexNode;
4349
import org.apache.calcite.rex.RexOver;
50+
import org.apache.calcite.rex.RexSlot;
4451
import org.apache.calcite.rex.RexVisitorImpl;
4552
import org.apache.calcite.rex.RexWindow;
4653
import org.apache.calcite.rex.RexWindowBound;
@@ -646,4 +653,97 @@ private static boolean isNotNullOnRef(RexNode rex) {
646653
&& rexCall.isA(SqlKind.IS_NOT_NULL)
647654
&& rexCall.getOperands().get(0) instanceof RexInputRef;
648655
}
656+
657+
Predicate<Aggregate> aggIgnoreNullBucket =
658+
agg ->
659+
agg.getHints().stream()
660+
.anyMatch(
661+
hint ->
662+
hint.hintName.equals("stats_args")
663+
&& hint.kvOptions.get(Argument.BUCKET_NULLABLE).equals("false"));
664+
665+
Predicate<Aggregate> maybeTimeSpanAgg =
666+
agg ->
667+
agg.getGroupSet().stream()
668+
.allMatch(
669+
group ->
670+
OpenSearchTypeUtil.isDatetime(
671+
agg.getInput().getRowType().getFieldList().get(group).getType()));
672+
673+
static boolean isTimeSpan(RexNode rex) {
674+
return rex instanceof RexCall rexCall
675+
&& rexCall.getKind() == SqlKind.OTHER_FUNCTION
676+
&& rexCall.getOperator().getName().equalsIgnoreCase(BuiltinFunctionName.SPAN.name())
677+
&& rexCall.getOperands().size() == 3
678+
&& rexCall.getOperands().get(2) instanceof RexLiteral unitLiteral
679+
&& unitLiteral.getTypeName() != SqlTypeName.NULL;
680+
}
681+
682+
/**
683+
* Check if the condition is NOT NULL derived from an aggregate.
684+
*
685+
* @param condition the condition to check, composite of single or multiple NOT NULL conditions
686+
* @param aggregate the aggregate where the condition is derived from
687+
* @param project the project between the aggregate and the filter
688+
* @param otherMapping the other mapping generated from ProjectIndexScanRule when applied on the
689+
* above project with non-ref expressions.
690+
* @return true if the condition is single or multiple NOT NULL derived from an aggregate, false
691+
* otherwise
692+
*/
693+
static boolean isNotNullDerivedFromAgg(
694+
RexNode condition,
695+
Aggregate aggregate,
696+
@Nullable Project project,
697+
@Nullable List<Integer> otherMapping) {
698+
boolean ignoreNullBucket = aggIgnoreNullBucket.test(aggregate);
699+
if (!ignoreNullBucket && project == null) return false;
700+
List<Integer> groupRefList = aggregate.getGroupSet().asList();
701+
if (project != null) {
702+
groupRefList =
703+
groupRefList.stream()
704+
.map(project.getProjects()::get)
705+
.filter(rex -> ignoreNullBucket || isTimeSpan(rex))
706+
.flatMap(expr -> PlanUtils.getInputRefs(expr).stream())
707+
.map(RexSlot::getIndex)
708+
.toList();
709+
}
710+
if (otherMapping != null) {
711+
groupRefList = groupRefList.stream().map(otherMapping::get).toList();
712+
}
713+
List<Integer> finalGroupRefList = groupRefList;
714+
Function<RexNode, Boolean> isNotNullFromAgg =
715+
rex ->
716+
rex instanceof RexCall rexCall
717+
&& rexCall.isA(SqlKind.IS_NOT_NULL)
718+
&& rexCall.getOperands().get(0) instanceof RexInputRef ref
719+
&& finalGroupRefList.contains(ref.getIndex());
720+
return isNotNullFromAgg.apply(condition)
721+
|| (condition instanceof RexCall rexCall
722+
&& rexCall.getOperator() == SqlStdOperatorTable.AND
723+
&& rexCall.getOperands().stream().allMatch(isNotNullFromAgg::apply));
724+
}
725+
726+
/**
727+
* Try to prune all RelNodes in the RuleCall from top to down. We can prune a RelNode if:
728+
*
729+
* <p>1. It's the root RelNode of the current RuleCall. Or,
730+
*
731+
* <p>2. It's logical RelNode and it only has one parent which is pruned. TODO: To be more
732+
* precisely, we can prun a RelNode whose parents are all pruned, but `prunedNodes` in
733+
* VolcanoPlanner is not available.
734+
*
735+
* @param call the RuleCall to prune
736+
*/
737+
static void tryPruneRelNodes(RelOptRuleCall call) {
738+
if (call.getPlanner() instanceof VolcanoPlanner volcanoPlanner) {
739+
Arrays.stream(call.rels)
740+
.takeWhile(
741+
rel ->
742+
// Don't prune the physical RelNode as it may prevent sort expr push down
743+
rel.getConvention() == Convention.NONE
744+
&& (rel == call.rels[0]
745+
|| volcanoPlanner.getSubsetNonNull(rel).getParentRels().size() == 1))
746+
.forEach(volcanoPlanner::prune);
747+
}
748+
}
649749
}

integ-test/src/test/java/org/opensearch/sql/calcite/big5/CalcitePPLBig5IT.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
package org.opensearch.sql.calcite.big5;
77

8+
import static org.opensearch.sql.util.MatcherUtils.assertYamlEqualsIgnoreId;
9+
810
import java.io.IOException;
911
import org.junit.FixMethodOrder;
1012
import org.junit.Test;
@@ -42,4 +44,13 @@ public void coalesce_nonexistent_field_fallback() throws IOException {
4244
String ppl = sanitize(loadExpectedQuery("coalesce_nonexistent_field_fallback.ppl"));
4345
timing(summary, "coalesce_nonexistent_field_fallback", ppl);
4446
}
47+
48+
/** Tests deduplication by metrics.size field with sorting by timestamp. */
49+
@Test
50+
public void dedup_metrics_size_field() throws IOException {
51+
String ppl = sanitize(loadExpectedQuery("dedup_metrics_size_field.ppl"));
52+
timing(summary, "dedup_metrics_size_field", ppl);
53+
String expected = loadExpectedPlan("big5/dedup_metrics_size_field.yaml");
54+
assertYamlEqualsIgnoreId(expected, explainQueryYaml(ppl));
55+
}
4556
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
{
3+
"name": "dedup_metrics_size_field",
4+
"operation-type": "search",
5+
"index": "{{index_name | default('big5')}}",
6+
"body": {
7+
"query": {
8+
"exists": {
9+
"field": "metrics.size",
10+
"boost": 1.0
11+
}
12+
},
13+
"_source": {
14+
"includes": ["agent", "process", "log", "message", "tags", "cloud", "input", "@timestamp", "ecs", "data_stream", "meta", "host", "metrics", "metrics.size", "aws", "event"],
15+
"excludes": []
16+
}
17+
}
18+
}
19+
*/
20+
source = big5
21+
| dedup metrics.size
22+
| sort - @timestamp

integ-test/src/test/resources/expectedOutput/calcite/agg_composite_date_range_push.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ calcite:
22
logical: |
33
LogicalSystemLimit(fetch=[10000], type=[QUERY_SIZE_LIMIT])
44
LogicalProject(avg(value)=[$2], span(@timestamp,1h)=[$1], value_range=[$0])
5-
LogicalAggregate(group=[{0, 1}], avg(value)=[AVG($2)])
6-
LogicalProject(value_range=[$10], span(@timestamp,1h)=[SPAN($0, 1, 'h')], value=[$2])
5+
LogicalAggregate(group=[{0, 2}], avg(value)=[AVG($1)])
6+
LogicalProject(value_range=[$10], value=[$2], span(@timestamp,1h)=[SPAN($0, 1, 'h')])
77
LogicalFilter(condition=[IS NOT NULL($0)])
88
LogicalProject(@timestamp=[$0], category=[$1], value=[$2], timestamp=[$3], _id=[$4], _index=[$5], _score=[$6], _maxscore=[$7], _sort=[$8], _routing=[$9], value_range=[CASE(<($2, 7000), 'small':VARCHAR, 'large':VARCHAR)])
99
CalciteLogicalIndexScan(table=[[OpenSearch, opensearch-sql_test_index_time_data]])
1010
physical: |
11-
CalciteEnumerableIndexScan(table=[[OpenSearch, opensearch-sql_test_index_time_data]], PushDownContext=[[FILTER->IS NOT NULL($0), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={0, 1},avg(value)=AVG($2)), PROJECT->[avg(value), span(@timestamp,1h), value_range], LIMIT->10000], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"exists":{"field":"@timestamp","boost":1.0}},"aggregations":{"composite_buckets":{"composite":{"size":1000,"sources":[{"span(@timestamp,1h)":{"date_histogram":{"field":"@timestamp","missing_bucket":false,"order":"asc","fixed_interval":"1h"}}}]},"aggregations":{"value_range":{"range":{"field":"value","ranges":[{"key":"small","to":7000.0},{"key":"large","from":7000.0}],"keyed":true},"aggregations":{"avg(value)":{"avg":{"field":"value"}}}}}}}}, requestedTotalSize=10000, pageSize=null, startFrom=0)])
11+
CalciteEnumerableIndexScan(table=[[OpenSearch, opensearch-sql_test_index_time_data]], PushDownContext=[[AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={0, 2},avg(value)=AVG($1)), PROJECT->[avg(value), span(@timestamp,1h), value_range], LIMIT->10000], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","aggregations":{"composite_buckets":{"composite":{"size":1000,"sources":[{"span(@timestamp,1h)":{"date_histogram":{"field":"@timestamp","missing_bucket":false,"order":"asc","fixed_interval":"1h"}}}]},"aggregations":{"value_range":{"range":{"field":"value","ranges":[{"key":"small","to":7000.0},{"key":"large","from":7000.0}],"keyed":true},"aggregations":{"avg(value)":{"avg":{"field":"value"}}}}}}}}, requestedTotalSize=10000, pageSize=null, startFrom=0)])

integ-test/src/test/resources/expectedOutput/calcite/big5/cardinality_agg_high.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ calcite:
66
LogicalFilter(condition=[IS NOT NULL($3)])
77
CalciteLogicalIndexScan(table=[[OpenSearch, big5]])
88
physical: |
9-
CalciteEnumerableIndexScan(table=[[OpenSearch, big5]], PushDownContext=[[FILTER->IS NOT NULL($3), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={},dc(`agent.name`)=COUNT(DISTINCT $0)), LIMIT->10000], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"exists":{"field":"agent.name","boost":1.0}},"aggregations":{"dc(`agent.name`)":{"cardinality":{"field":"agent.name"}}}}, requestedTotalSize=2147483647, pageSize=null, startFrom=0)])
9+
CalciteEnumerableIndexScan(table=[[OpenSearch, big5]], PushDownContext=[[FILTER->IS NOT NULL($0), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={},dc(`agent.name`)=COUNT(DISTINCT $0)), LIMIT->10000], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"exists":{"field":"agent.name","boost":1.0}},"aggregations":{"dc(`agent.name`)":{"cardinality":{"field":"agent.name"}}}}, requestedTotalSize=2147483647, pageSize=null, startFrom=0)])

integ-test/src/test/resources/expectedOutput/calcite/big5/cardinality_agg_high_2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ calcite:
66
LogicalFilter(condition=[IS NOT NULL($37)])
77
CalciteLogicalIndexScan(table=[[OpenSearch, big5]])
88
physical: |
9-
CalciteEnumerableIndexScan(table=[[OpenSearch, big5]], PushDownContext=[[FILTER->IS NOT NULL($37), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={},dc(`event.id`)=COUNT(DISTINCT $0)), LIMIT->10000], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"exists":{"field":"event.id","boost":1.0}},"aggregations":{"dc(`event.id`)":{"cardinality":{"field":"event.id"}}}}, requestedTotalSize=2147483647, pageSize=null, startFrom=0)])
9+
CalciteEnumerableIndexScan(table=[[OpenSearch, big5]], PushDownContext=[[FILTER->IS NOT NULL($0), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={},dc(`event.id`)=COUNT(DISTINCT $0)), LIMIT->10000], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"exists":{"field":"event.id","boost":1.0}},"aggregations":{"dc(`event.id`)":{"cardinality":{"field":"event.id"}}}}, requestedTotalSize=2147483647, pageSize=null, startFrom=0)])

integ-test/src/test/resources/expectedOutput/calcite/big5/cardinality_agg_low.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ calcite:
66
LogicalFilter(condition=[IS NOT NULL($14)])
77
CalciteLogicalIndexScan(table=[[OpenSearch, big5]])
88
physical: |
9-
CalciteEnumerableIndexScan(table=[[OpenSearch, big5]], PushDownContext=[[FILTER->IS NOT NULL($14), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={},dc(`cloud.region`)=COUNT(DISTINCT $0)), LIMIT->10000], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"exists":{"field":"cloud.region","boost":1.0}},"aggregations":{"dc(`cloud.region`)":{"cardinality":{"field":"cloud.region"}}}}, requestedTotalSize=2147483647, pageSize=null, startFrom=0)])
9+
CalciteEnumerableIndexScan(table=[[OpenSearch, big5]], PushDownContext=[[FILTER->IS NOT NULL($0), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={},dc(`cloud.region`)=COUNT(DISTINCT $0)), LIMIT->10000], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"exists":{"field":"cloud.region","boost":1.0}},"aggregations":{"dc(`cloud.region`)":{"cardinality":{"field":"cloud.region"}}}}, requestedTotalSize=2147483647, pageSize=null, startFrom=0)])

integ-test/src/test/resources/expectedOutput/calcite/big5/composite_date_histogram_daily.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ calcite:
55
LogicalProject(count()=[$1], span(`@timestamp`,1d)=[$0])
66
LogicalAggregate(group=[{0}], count()=[COUNT()])
77
LogicalProject(span(`@timestamp`,1d)=[SPAN($17, 1, 'd')])
8-
LogicalFilter(condition=[AND(>=($17, TIMESTAMP('2022-12-30 00:00:00')), <($17, TIMESTAMP('2023-01-07 12:00:00')))])
8+
LogicalFilter(condition=[AND(>=($17, TIMESTAMP('2022-12-30 00:00:00':VARCHAR)), <($17, TIMESTAMP('2023-01-07 12:00:00':VARCHAR)))])
99
CalciteLogicalIndexScan(table=[[OpenSearch, big5]])
1010
physical: |
11-
CalciteEnumerableIndexScan(table=[[OpenSearch, big5]], PushDownContext=[[PROJECT->[@timestamp], FILTER->SEARCH($0, Sarg[['2022-12-30 00:00:00':EXPR_TIMESTAMP VARCHAR..'2023-01-07 12:00:00':EXPR_TIMESTAMP VARCHAR)]:EXPR_TIMESTAMP VARCHAR), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={0},count()=COUNT()), PROJECT->[count(), span(`@timestamp`,1d)], LIMIT->10, LIMIT->10000], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"range":{"@timestamp":{"from":"2022-12-30T00:00:00.000Z","to":"2023-01-07T12:00:00.000Z","include_lower":true,"include_upper":false,"format":"date_time","boost":1.0}}},"_source":{"includes":["@timestamp"],"excludes":[]},"aggregations":{"composite_buckets":{"composite":{"size":10,"sources":[{"span(`@timestamp`,1d)":{"date_histogram":{"field":"@timestamp","missing_bucket":false,"order":"asc","fixed_interval":"1d"}}}]}}}}, requestedTotalSize=10, pageSize=null, startFrom=0)])
11+
CalciteEnumerableIndexScan(table=[[OpenSearch, big5]], PushDownContext=[[FILTER->SEARCH($0, Sarg[['2022-12-30 00:00:00':VARCHAR..'2023-01-07 12:00:00':VARCHAR)]:VARCHAR), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={0},count()=COUNT()), PROJECT->[count(), span(`@timestamp`,1d)], LIMIT->10, LIMIT->10000], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"range":{"@timestamp":{"from":"2022-12-30T00:00:00.000Z","to":"2023-01-07T12:00:00.000Z","include_lower":true,"include_upper":false,"format":"date_time","boost":1.0}}},"aggregations":{"composite_buckets":{"composite":{"size":10,"sources":[{"span(`@timestamp`,1d)":{"date_histogram":{"field":"@timestamp","missing_bucket":false,"order":"asc","fixed_interval":"1d"}}}]}}}}, requestedTotalSize=10, pageSize=null, startFrom=0)])

0 commit comments

Comments
 (0)