Skip to content

Commit 010fd06

Browse files
committed
Remove a note in condition.rst
Signed-off-by: Yuanchun Shen <yuanchu@amazon.com>
1 parent a22ae79 commit 010fd06

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

docs/user/ppl/functions/condition.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,6 @@ When each condition is a field comparison with a numeric literal and each result
235235
- Null values will not be grouped into any bucket of a range aggregation and will be ignored
236236
- The default ELSE clause will use the string literal ``"null"`` instead of actual NULL values
237237

238-
To avoid these edge-case limitations, set ``plugins.calcite.pushdown.enabled`` to false.
239-
240238
Example::
241239

242240
os> source=accounts | eval result = case(age > 35, firstname, age < 30, lastname else employer) | fields result, firstname, lastname, age, employer

opensearch/src/main/java/org/opensearch/sql/opensearch/request/AggregateAnalyzer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,12 @@ public static Pair<List<AggregationBuilder>, OpenSearchAggregationResponseParser
216216
// Used to track the current sub-builder as analysis progresses
217217
Builder subBuilder = newMetricBuilder;
218218

219+
// Push auto date span & case in group-by list into nested aggregations
219220
Pair<Set<Integer>, AggregationBuilder> aggPushedAndAggBuilder =
220221
createNestedAggregation(groupList, project, subBuilder, helper);
221222
Set<Integer> aggPushed = aggPushedAndAggBuilder.getLeft();
222223
AggregationBuilder pushedAggBuilder = aggPushedAndAggBuilder.getRight();
223-
// The group-by list after removing composite-incompatible aggregations
224+
// The group-by list after removing pushed aggregations
224225
groupList = groupList.stream().filter(i -> !aggPushed.contains(i)).toList();
225226
if (pushedAggBuilder != null) {
226227
subBuilder = new Builder().addAggregator(pushedAggBuilder);
@@ -258,9 +259,8 @@ else if (groupList.isEmpty()) {
258259
// - stats avg() by date_histogram
259260
// - stats count() by auto_date_span, range_field, term_fields
260261
// CompositeAgg
261-
// [...RangeAgg]
262-
// [...AutoDateHistogramAgg]
263-
// Metric
262+
// [AutoDateHistogram | RangeAgg]*
263+
// Metric
264264
else {
265265
List<CompositeValuesSourceBuilder<?>> buckets =
266266
createCompositeBuckets(groupList, project, helper);

0 commit comments

Comments
 (0)