Skip to content

Commit d722baf

Browse files
committed
Fix explain ITs after merging main
Signed-off-by: Yuanchun Shen <yuanchu@amazon.com>
1 parent 69a2d01 commit d722baf

39 files changed

Lines changed: 369 additions & 74 deletions

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, 2}], avg(value)=[AVG($1)])
6-
LogicalProject(value_range=[$10], value=[$2], span(@timestamp,1h)=[SPAN($0, 1, 'h')])
5+
LogicalAggregate(group=[{0, 1}], avg(value)=[AVG($2)])
6+
LogicalProject(value_range=[$10], span(@timestamp,1h)=[SPAN($0, 1, 'h')], value=[$2])
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=[[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)])
11+
CalciteEnumerableIndexScan(table=[[OpenSearch, opensearch-sql_test_index_time_data]], PushDownContext=[[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","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)])
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
1+
12
calcite:
23
logical: |
34
LogicalSystemLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[10000], type=[QUERY_SIZE_LIMIT])
45
LogicalSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC])
56
LogicalAggregate(group=[{0, 1}], max(value)=[MAX($2)])
6-
LogicalProject(timestamp=[$0], category=[CASE(IS NULL($1), 'NULL', <=($5, 10), $1, 'OTHER')], max(value)=[$2])
7+
LogicalProject(timestamp=[$0], category=[CASE(IS NULL($1), 'NULL':VARCHAR, <=($5, 10), $1, 'OTHER':VARCHAR)], max(value)=[$2])
78
LogicalJoin(condition=[=($1, $3)], joinType=[left])
89
LogicalProject(timestamp=[$1], category=[$0], max(value)=[$2])
9-
LogicalAggregate(group=[{0, 2}], max(value)=[MAX($1)])
10-
LogicalProject(category=[$1], value=[$2], timestamp0=[SPAN($3, 1, 'w')])
10+
LogicalAggregate(group=[{0, 1}], max(value)=[MAX($2)])
11+
LogicalProject(category=[$1], timestamp=[SPAN($3, 1, 'w')], value=[$2])
1112
LogicalFilter(condition=[AND(IS NOT NULL($3), IS NOT NULL($2))])
1213
CalciteLogicalIndexScan(table=[[OpenSearch, opensearch-sql_test_index_time_data]])
1314
LogicalProject(category=[$0], __grand_total__=[$1], _row_number_chart_=[ROW_NUMBER() OVER (ORDER BY $1 DESC NULLS LAST)])
1415
LogicalAggregate(group=[{0}], __grand_total__=[SUM($1)])
1516
LogicalFilter(condition=[IS NOT NULL($0)])
1617
LogicalProject(category=[$0], max(value)=[$2])
17-
LogicalAggregate(group=[{0, 2}], max(value)=[MAX($1)])
18-
LogicalProject(category=[$1], value=[$2], timestamp0=[SPAN($3, 1, 'w')])
18+
LogicalAggregate(group=[{0, 1}], max(value)=[MAX($2)])
19+
LogicalProject(category=[$1], $f1=[SPAN($3, 1, 'w')], value=[$2])
1920
LogicalFilter(condition=[AND(IS NOT NULL($3), IS NOT NULL($2))])
2021
CalciteLogicalIndexScan(table=[[OpenSearch, opensearch-sql_test_index_time_data]])
2122
physical: |
2223
EnumerableLimit(fetch=[10000])
2324
EnumerableSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC])
2425
EnumerableAggregate(group=[{0, 1}], max(value)=[MAX($2)])
25-
EnumerableCalc(expr#0..4=[{inputs}], expr#5=[IS NULL($t1)], expr#6=['NULL'], expr#7=[10], expr#8=[<=($t4, $t7)], expr#9=['OTHER'], expr#10=[CASE($t5, $t6, $t8, $t1, $t9)], timestamp=[$t0], category=[$t10], max(value)=[$t2])
26+
EnumerableCalc(expr#0..4=[{inputs}], expr#5=[IS NULL($t1)], expr#6=['NULL':VARCHAR], expr#7=[10:BIGINT], expr#8=[<=($t4, $t7)], expr#9=['OTHER':VARCHAR], expr#10=[CASE($t5, $t6, $t8, $t1, $t9)], timestamp=[$t0], category=[$t10], max(value)=[$t2])
2627
EnumerableMergeJoin(condition=[=($1, $3)], joinType=[left])
27-
CalciteEnumerableIndexScan(table=[[OpenSearch, opensearch-sql_test_index_time_data]], PushDownContext=[[FILTER->AND(IS NOT NULL($2), IS NOT NULL($1)), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={0, 2},max(value)=MAX($1)), PROJECT->[timestamp0, category, max(value)], SORT->[1]], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"bool":{"must":[{"exists":{"field":"timestamp","boost":1.0}},{"exists":{"field":"value","boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},"aggregations":{"composite_buckets":{"composite":{"size":1000,"sources":[{"category":{"terms":{"field":"category","missing_bucket":true,"missing_order":"last","order":"asc"}}},{"timestamp0":{"date_histogram":{"field":"timestamp","missing_bucket":false,"order":"asc","calendar_interval":"1w"}}}]},"aggregations":{"max(value)":{"max":{"field":"value"}}}}}}, requestedTotalSize=2147483647, pageSize=null, startFrom=0)])
28+
CalciteEnumerableIndexScan(table=[[OpenSearch, opensearch-sql_test_index_time_data]], PushDownContext=[[FILTER->AND(IS NOT NULL($2), IS NOT NULL($1)), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={0, 1},max(value)=MAX($2)), PROJECT->[timestamp, category, max(value)], SORT->[1]], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"bool":{"must":[{"exists":{"field":"timestamp","boost":1.0}},{"exists":{"field":"value","boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},"aggregations":{"composite_buckets":{"composite":{"size":1000,"sources":[{"category":{"terms":{"field":"category","missing_bucket":true,"missing_order":"last","order":"asc"}}},{"timestamp":{"date_histogram":{"field":"timestamp","missing_bucket":false,"order":"asc","calendar_interval":"1w"}}}]},"aggregations":{"max(value)":{"max":{"field":"value"}}}}}}, requestedTotalSize=2147483647, pageSize=null, startFrom=0)])
2829
EnumerableSort(sort0=[$0], dir0=[ASC])
2930
EnumerableCalc(expr#0..2=[{inputs}], category=[$t0], $1=[$t2])
3031
EnumerableWindow(window#0=[window(order by [1 DESC-nulls-last] rows between UNBOUNDED PRECEDING and CURRENT ROW aggs [ROW_NUMBER()])])
3132
EnumerableAggregate(group=[{0}], __grand_total__=[SUM($1)])
32-
CalciteEnumerableIndexScan(table=[[OpenSearch, opensearch-sql_test_index_time_data]], PushDownContext=[[FILTER->AND(IS NOT NULL($2), IS NOT NULL($1)), FILTER->IS NOT NULL($0), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={0, 2},max(value)=MAX($1)), PROJECT->[category, max(value)]], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"bool":{"filter":[{"bool":{"must":[{"exists":{"field":"timestamp","boost":1.0}},{"exists":{"field":"value","boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},{"exists":{"field":"category","boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},"aggregations":{"composite_buckets":{"composite":{"size":1000,"sources":[{"category":{"terms":{"field":"category","missing_bucket":true,"missing_order":"first","order":"asc"}}},{"timestamp0":{"date_histogram":{"field":"timestamp","missing_bucket":false,"order":"asc","calendar_interval":"1w"}}}]},"aggregations":{"max(value)":{"max":{"field":"value"}}}}}}, requestedTotalSize=2147483647, pageSize=null, startFrom=0)])
33+
CalciteEnumerableIndexScan(table=[[OpenSearch, opensearch-sql_test_index_time_data]], PushDownContext=[[FILTER->AND(IS NOT NULL($2), IS NOT NULL($1)), FILTER->IS NOT NULL($0), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={0, 1},max(value)=MAX($2)), PROJECT->[category, max(value)]], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"bool":{"filter":[{"bool":{"must":[{"exists":{"field":"timestamp","boost":1.0}},{"exists":{"field":"value","boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},{"exists":{"field":"category","boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},"aggregations":{"composite_buckets":{"composite":{"size":1000,"sources":[{"category":{"terms":{"field":"category","missing_bucket":true,"missing_order":"first","order":"asc"}}},{"timestamp":{"date_histogram":{"field":"timestamp","missing_bucket":false,"order":"asc","calendar_interval":"1w"}}}]},"aggregations":{"max(value)":{"max":{"field":"value"}}}}}}, requestedTotalSize=2147483647, pageSize=null, startFrom=0)])

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ calcite:
22
logical: |
33
LogicalSystemLimit(sort0=[$0], dir0=[ASC], fetch=[10000], type=[QUERY_SIZE_LIMIT])
44
LogicalSort(sort0=[$0], dir0=[ASC])
5-
LogicalProject(age=[$0], max(balance)=[$1])
6-
LogicalAggregate(group=[{1}], max(balance)=[MAX($0)])
7-
LogicalProject(balance=[$7], age0=[SPAN($10, 10, null:NULL)])
8-
LogicalFilter(condition=[AND(IS NOT NULL($10), IS NOT NULL($7))])
9-
CalciteLogicalIndexScan(table=[[OpenSearch, opensearch-sql_test_index_bank]])
5+
LogicalAggregate(group=[{0}], max(balance)=[MAX($1)])
6+
LogicalProject(age=[SPAN($10, 10, null:ANY)], balance=[$7])
7+
LogicalFilter(condition=[AND(IS NOT NULL($10), IS NOT NULL($7))])
8+
CalciteLogicalIndexScan(table=[[OpenSearch, opensearch-sql_test_index_bank]])
109
physical: |
11-
CalciteEnumerableIndexScan(table=[[OpenSearch, opensearch-sql_test_index_bank]], PushDownContext=[[FILTER->AND(IS NOT NULL($1), IS NOT NULL($0)), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={1},max(balance)=MAX($0)), SORT->[0], LIMIT->10000], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"bool":{"must":[{"exists":{"field":"age","boost":1.0}},{"exists":{"field":"balance","boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},"aggregations":{"composite_buckets":{"composite":{"size":1000,"sources":[{"age0":{"histogram":{"field":"age","missing_bucket":false,"order":"asc","interval":10.0}}}]},"aggregations":{"max(balance)":{"max":{"field":"balance"}}}}}}, requestedTotalSize=10000, pageSize=null, startFrom=0)])
10+
CalciteEnumerableIndexScan(table=[[OpenSearch, opensearch-sql_test_index_bank]], PushDownContext=[[FILTER->AND(IS NOT NULL($1), IS NOT NULL($0)), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={0},max(balance)=MAX($1)), SORT->[0], LIMIT->10000], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"bool":{"must":[{"exists":{"field":"age","boost":1.0}},{"exists":{"field":"balance","boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},"aggregations":{"composite_buckets":{"composite":{"size":1000,"sources":[{"age":{"histogram":{"field":"age","missing_bucket":false,"order":"asc","interval":10.0}}}]},"aggregations":{"max(balance)":{"max":{"field":"balance"}}}}}}, requestedTotalSize=10000, pageSize=null, startFrom=0)])
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
calcite:
2+
logical: |
3+
LogicalSystemLimit(fetch=[10000], type=[QUERY_SIZE_LIMIT])
4+
LogicalProject(age2=[$2])
5+
LogicalFilter(condition=[<=($3, SAFE_CAST(1:BIGINT))])
6+
LogicalProject(avg_age=[$0], state=[$1], age2=[$2], _row_number_dedup_=[ROW_NUMBER() OVER (PARTITION BY $2)])
7+
LogicalFilter(condition=[IS NOT NULL($2)])
8+
LogicalSort(sort0=[$1], dir0=[ASC-nulls-first])
9+
LogicalProject(avg_age=[$2], state=[$0], age2=[+($2, 2)])
10+
LogicalAggregate(group=[{0, 1}], avg_age=[AVG($2)])
11+
LogicalProject(state=[$7], city=[$5], age=[$8])
12+
LogicalFilter(condition=[>($8, SAFE_CAST(30:BIGINT))])
13+
CalciteLogicalIndexScan(table=[[OpenSearch, opensearch-sql_test_index_account]])
14+
physical: |
15+
EnumerableCalc(expr#0..1=[{inputs}], age2=[$t0])
16+
EnumerableLimit(fetch=[10000])
17+
EnumerableCalc(expr#0..1=[{inputs}], expr#2=[1:BIGINT], expr#3=[<=($t1, $t2)], proj#0..1=[{exprs}], $condition=[$t3])
18+
EnumerableWindow(window#0=[window(partition {0} rows between UNBOUNDED PRECEDING and CURRENT ROW aggs [ROW_NUMBER()])])
19+
EnumerableCalc(expr#0=[{inputs}], expr#1=[2], expr#2=[+($t0, $t1)], expr#3=[IS NOT NULL($t0)], age2=[$t2], $condition=[$t3])
20+
CalciteEnumerableIndexScan(table=[[OpenSearch, opensearch-sql_test_index_account]], PushDownContext=[[FILTER->>($2, 30), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={0, 1},avg_age=AVG($2)), SORT->[1 ASC FIRST], PROJECT->[avg_age]], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"range":{"age":{"from":30,"to":null,"include_lower":false,"include_upper":true,"boost":1.0}}},"aggregations":{"composite_buckets":{"composite":{"size":1000,"sources":[{"state":{"terms":{"field":"state.keyword","missing_bucket":true,"missing_order":"first","order":"asc"}}},{"city":{"terms":{"field":"city.keyword","missing_bucket":true,"missing_order":"first","order":"asc"}}}]},"aggregations":{"avg_age":{"avg":{"field":"age"}}}}}}, requestedTotalSize=2147483647, pageSize=null, startFrom=0)])

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ calcite:
88
LogicalAggregate(group=[{0}], c=[COUNT()])
99
LogicalProject(state=[$7])
1010
CalciteLogicalIndexScan(table=[[OpenSearch, opensearch-sql_test_index_account]])
11-
LogicalSystemLimit(fetch=[50000], type=[JOIN_SUBSEARCH_MAXOUT])
11+
LogicalSort(fetch=[50000])
1212
LogicalProject(c=[$1], state=[$0])
1313
LogicalAggregate(group=[{0}], c=[COUNT()])
1414
LogicalProject(state=[$7])
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
calcite:
2+
logical: |
3+
LogicalSystemLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[10000], type=[QUERY_SIZE_LIMIT])
4+
LogicalSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC])
5+
LogicalAggregate(group=[{0, 1}], max(value)=[MAX($2)])
6+
LogicalProject(timestamp=[$0], category=[CASE(IS NULL($1), 'NULL':VARCHAR, <=($5, 10), $1, 'OTHER':VARCHAR)], max(value)=[$2])
7+
LogicalJoin(condition=[=($1, $3)], joinType=[left])
8+
LogicalProject(timestamp=[$1], category=[$0], max(value)=[$2])
9+
LogicalAggregate(group=[{0, 1}], max(value)=[MAX($2)])
10+
LogicalProject(category=[$1], timestamp=[SPAN($3, 1, 'w')], value=[$2])
11+
LogicalFilter(condition=[AND(IS NOT NULL($3), IS NOT NULL($2))])
12+
CalciteLogicalIndexScan(table=[[OpenSearch, opensearch-sql_test_index_time_data]])
13+
LogicalProject(category=[$0], __grand_total__=[$1], _row_number_chart_=[ROW_NUMBER() OVER (ORDER BY $1 DESC NULLS LAST)])
14+
LogicalAggregate(group=[{0}], __grand_total__=[SUM($1)])
15+
LogicalFilter(condition=[IS NOT NULL($0)])
16+
LogicalProject(category=[$0], max(value)=[$2])
17+
LogicalAggregate(group=[{0, 1}], max(value)=[MAX($2)])
18+
LogicalProject(category=[$1], $f1=[SPAN($3, 1, 'w')], value=[$2])
19+
LogicalFilter(condition=[AND(IS NOT NULL($3), IS NOT NULL($2))])
20+
CalciteLogicalIndexScan(table=[[OpenSearch, opensearch-sql_test_index_time_data]])
21+
physical: |
22+
EnumerableLimit(fetch=[10000])
23+
EnumerableSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC])
24+
EnumerableAggregate(group=[{0, 1}], max(value)=[MAX($2)])
25+
EnumerableCalc(expr#0..4=[{inputs}], expr#5=[IS NULL($t1)], expr#6=['NULL':VARCHAR], expr#7=[10:BIGINT], expr#8=[<=($t4, $t7)], expr#9=['OTHER':VARCHAR], expr#10=[CASE($t5, $t6, $t8, $t1, $t9)], timestamp=[$t0], category=[$t10], max(value)=[$t2])
26+
EnumerableMergeJoin(condition=[=($1, $3)], joinType=[left])
27+
CalciteEnumerableIndexScan(table=[[OpenSearch, opensearch-sql_test_index_time_data]], PushDownContext=[[FILTER->AND(IS NOT NULL($2), IS NOT NULL($1)), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={0, 1},max(value)=MAX($2)), PROJECT->[timestamp, category, max(value)], SORT->[1]], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"bool":{"must":[{"exists":{"field":"timestamp","boost":1.0}},{"exists":{"field":"value","boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},"aggregations":{"composite_buckets":{"composite":{"size":1000,"sources":[{"category":{"terms":{"field":"category","missing_bucket":true,"missing_order":"last","order":"asc"}}},{"timestamp":{"date_histogram":{"field":"timestamp","missing_bucket":false,"order":"asc","calendar_interval":"1w"}}}]},"aggregations":{"max(value)":{"max":{"field":"value"}}}}}}, requestedTotalSize=2147483647, pageSize=null, startFrom=0)])
28+
EnumerableSort(sort0=[$0], dir0=[ASC])
29+
EnumerableCalc(expr#0..2=[{inputs}], category=[$t0], $1=[$t2])
30+
EnumerableWindow(window#0=[window(order by [1 DESC-nulls-last] rows between UNBOUNDED PRECEDING and CURRENT ROW aggs [ROW_NUMBER()])])
31+
EnumerableAggregate(group=[{0}], __grand_total__=[SUM($1)])
32+
CalciteEnumerableIndexScan(table=[[OpenSearch, opensearch-sql_test_index_time_data]], PushDownContext=[[FILTER->AND(IS NOT NULL($2), IS NOT NULL($1)), FILTER->IS NOT NULL($0), AGGREGATION->rel#:LogicalAggregate.NONE.[](input=RelSubset#,group={0, 1},max(value)=MAX($2)), PROJECT->[category, max(value)]], OpenSearchRequestBuilder(sourceBuilder={"from":0,"size":0,"timeout":"1m","query":{"bool":{"filter":[{"bool":{"must":[{"exists":{"field":"timestamp","boost":1.0}},{"exists":{"field":"value","boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},{"exists":{"field":"category","boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},"aggregations":{"composite_buckets":{"composite":{"size":1000,"sources":[{"category":{"terms":{"field":"category","missing_bucket":true,"missing_order":"first","order":"asc"}}},{"timestamp":{"date_histogram":{"field":"timestamp","missing_bucket":false,"order":"asc","calendar_interval":"1w"}}}]},"aggregations":{"max(value)":{"max":{"field":"value"}}}}}}, requestedTotalSize=2147483647, pageSize=null, startFrom=0)])

0 commit comments

Comments
 (0)