Skip to content

Conversation

@yuancu
Copy link
Collaborator

@yuancu yuancu commented Sep 28, 2025

Description

This PR push down CASE functions used in aggregations as range queries.

For example, the query source=bank | eval age_range = case (age < 30, 'u30', age < 40, 'u40' else 'u100') | stats avg(balance) by age_range will be pushed down as the following OpenSearch DSL:

{
  "aggregations": {
    "age_range": {
      "range": {
        "field": "age",
        "ranges": [
          {
            "key": "u30",
            "to": 30
          },
          {
            "key": "u40",
            "from": 30,
            "to": 40
          },
          {
            "key": "u100",
            "from": 40
          }
        ],
        "keyed": true
      },
      "aggregations": {
        "avg(balance)": {
          "avg": {
            "field": "balance"
          }
        }
      }
    }
  }
}

A CASE function used in aggregation can be pushed down only if it satisfied the following criteria:

  • Result expressions must be string literals
  • The field referenced in the condition must be the same
  • Field references must be numeric
  • Ranges must be closed-open intervals: $[a, b)$, $[a, +inf)$, or $(-inf, b)$.
  • No further operations can be performed on the result of the case function

Limitations:

  • It only handle cases where the result expression is a string literal. E.g. case(balance<10, 'poor' else 'rich') will be pushed down, while case(balance<10, 10 else 100) won't.
  • Red flag: range query will ignore null values. E.g. eval b = case(balance<10, 'poor' else 'rich') | stats avg(balance) by b will not properly handle cases when there are balance with null values. For case function, null values be categorized into the else group; while with pushed-down aggregation, rows with null balance will be ignored.
  • With case function, the default else group is null. However, since null can not be a key for a range query, we substitute it with "null". This can be fixed later by assigning a secret key to the else group, and substituting it later when parsing the response.

Examples of generated DSL

Case 1: Group by the case field only, with sub-aggregations
source=bank | eval age_range = case (age < 30, 'u30', age < 40, 'u40' else 'u100') | stats avg(balance) by age_range
RangeAgg
    MetricAgg
{
  "aggregations": {
    "age_range": {
      "range": {
        "field": "age",
        "ranges": [
          {
            "key": "u30",
            "to": 30
          },
          {
            "key": "u40",
            "from": 30,
            "to": 40
          },
          {
            "key": "u100",
            "from": 40
          }
        ],
        "keyed": true
      },
      "aggregations": {
        "avg(balance)": {
          "avg": {
            "field": "balance"
          }
        }
      }
    }
  }
}
Case 2: Group by multiple ranges with sub-aggregations
source=bank | eval age_range = case (age < 30, 'u30', age < 35, 'u35', age < 40, 'u40', age >= 40, 'u100'), balance_range = case(balance < 20000, 'medium' else 'high') | stats avg(balance) by age_range, balance_range
RangeAgg
    RangeAgg
        MetricAgg
{
  "aggregations": {
    "age_range": {
      "range": {
        "field": "age",
        "ranges": [
          {
            "key": "u30",
            "to": 30
          },
          {
            "key": "u35",
            "from": 30,
            "to": 35
          },
          {
            "key": "u40",
            "from": 35,
            "to": 40
          },
          {
            "key": "u100",
            "from": 40
          }
        ],
        "keyed": true
      },
      "aggregations": {
        "balance_range": {
          "range": {
            "field": "balance",
            "ranges": [
              {
                "key": "medium",
                "to": 20000
              },
              {
                "key": "high",
                "from": 20000
              }
            ],
            "keyed": true
          },
          "aggregations": {
            "avg(balance)": {
              "avg": {
                "field": "balance"
              }
            }
          }
        }
      }
    }
  }
}
Case 3: Group by case field and keyword field
source=bank | eval age_range = case (age < 30, 'u30', age < 35, 'u35', age < 40, 'u40', age >= 40, 'u100') | stats avg(balance), count() by firstname, lastname, age_range
CompositeAgg
    RangeAgg
        MetricAgg
{
  "aggregations": {
    "composite_buckets": {
      "composite": {
        "size": 1000,
        "sources": [
          {
            "firstname": {
              "terms": {
                "field": "firstname",
                "missing_bucket": true,
                "missing_order": "first",
                "order": "asc"
              }
            }
          },
          {
            "lastname": {
              "terms": {
                "field": "lastname",
                "missing_bucket": true,
                "missing_order": "first",
                "order": "asc"
              }
            }
          }
        ]
      },
      "aggregations": {
        "age_range": {
          "range": {
            "field": "age",
            "ranges": [
              {
                "key": "u30",
                "to": 30
              },
              {
                "key": "u35",
                "from": 30,
                "to": 35
              },
              {
                "key": "u40",
                "from": 35,
                "to": 40
              },
              {
                "key": "u100",
                "from": 40
              }
            ],
            "keyed": true
          },
          "aggregations": {
            "avg(balance)": {
              "avg": {
                "field": "balance"
              }
            }
          }
        }
      }
    }
  }
}

TODOs:

  • Fix the discrepancy of null as expression results (in the pushed down version, it is "null" instead of null) left as a limitation.
  • Test cases where the result expressions are numbers
  • Test cases where there contains null values
  • Javadoc for newly added interfaces
  • Refactor bucket parsers, etc once Fallback to sub-aggregation if composite aggregation doesn't support #4413 is merged
  • Unify how sub-aggregations are created across AutoDataHistogramAggregation, RangeAggregation and CompositeAggregation

Related Issues

Resolves #4201 , partially resolves #4338

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • New PPL command checklist all confirmed.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff or -s.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@yuancu yuancu added the enhancement New feature or request label Sep 28, 2025
Signed-off-by: Yuanchun Shen <[email protected]>
Comment on lines 219 to 228
// Push auto date span & case in group-by list into nested aggregations
Pair<Set<Integer>, AggregationBuilder> aggPushedAndAggBuilder =
createNestedAggregation(groupList, project, subBuilder, helper);
Set<Integer> aggPushed = aggPushedAndAggBuilder.getLeft();
AggregationBuilder pushedAggBuilder = aggPushedAndAggBuilder.getRight();
// The group-by list after removing pushed aggregations
groupList = groupList.stream().filter(i -> !aggPushed.contains(i)).toList();
if (pushedAggBuilder != null) {
subBuilder = new Builder().addAggregator(pushedAggBuilder);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[non-blocking] Should this part of code be put in the second branch of the below if for better readability? It should have structure like:

if (aggregate.getGroupSet().isEmpty()) {
  // no group by
} else {
    // Push auto date span & case in group-by list into nested aggregations
   ...
   ...
   if (groupList.isEmpty()) {
        // No composite aggregation at top-level
        ...
   } else {
        // Composite aggregation at top level
        ...
    }
}

It works well with current code but performing useless operations on some empty collections for no-group-by.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion! optimized the logic here

}
} else if (bucket instanceof Range.Bucket) {
// return null so that an empty range will be filtered out
if (bucket.getDocCount() == 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put this at the beginning of this method to skip meaningless operations in advance?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include InternalAutoDateHistogram.Bucket here as well to skip empty bucket for auto_date_span.

And also remove the code

if (aggregationBuilder.getLeft().size() == 1
&& aggregationBuilder.getLeft().getFirst()
instanceof AutoDateHistogramAggregationBuilder autoDateHistogram) {
// If it's auto_date_histogram, filter the empty bucket by using the first aggregate metrics
RexBuilder rexBuilder = getCluster().getRexBuilder();
Optional<AggregationBuilder> aggBuilderOpt =
autoDateHistogram.getSubAggregations().stream().toList().stream().findFirst();
RexNode condition =
aggBuilderOpt.isEmpty() || aggBuilderOpt.get() instanceof ValueCountAggregationBuilder
? rexBuilder.makeCall(
SqlStdOperatorTable.GREATER_THAN,
rexBuilder.makeInputRef(newScan, 1),
rexBuilder.makeLiteral(
0, rexBuilder.getTypeFactory().createSqlType(SqlTypeName.INTEGER)))
: rexBuilder.makeCall(
SqlStdOperatorTable.IS_NOT_NULL, rexBuilder.makeInputRef(newScan, 1));
return LogicalFilter.create(newScan, condition);
}
here. Previously we add another filter to filter out the empty bucket.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored as suggested

return null;
}
// the content of the range bucket is extracted with `r.put(name, bucket.getKey())` below
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be another else here? Otherwise it will put the bucket.getKey into the results for composite agg as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. I used to put all contents in bucket.getKey to pass unit tests in a wrong way; corrected the behavior now.

rows(39225.0, 1, "a30", "IL", "M"),
rows(48086.0, 1, "a30", "IN", "F"));

// 2.4 Composite (2 fields) - Range - Range - Metric (with count)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add test case for composite - auto_date_span - range - metric. Set bins to a big enough value like 100 to verify whether the empty buckets are filtered out properly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test added

qianheng-aws
qianheng-aws previously approved these changes Oct 21, 2025
// 1.1 Range - Metric
assertYamlEqualsJsonIgnoreId(
loadExpectedPlan("agg_range_metric_push.yaml"),
explainQueryToString(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should change to explainQueryYaml

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Thanks for reminding!

@qianheng-aws qianheng-aws merged commit 18ab4dc into opensearch-project:main Oct 22, 2025
33 checks passed
@yuancu yuancu deleted the issues/4201 branch October 22, 2025 06:38
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.19-dev failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/sql/backport-2.19-dev 2.19-dev
# Navigate to the new working tree
pushd ../.worktrees/sql/backport-2.19-dev
# Create a new branch
git switch --create backport/backport-4400-to-2.19-dev
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 18ab4dc9a02589e4348d67fa4b38a66d27ad7f59
# Push it to GitHub
git push --set-upstream origin backport/backport-4400-to-2.19-dev
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/sql/backport-2.19-dev

Then, create a pull request where the base branch is 2.19-dev and the compare/head branch is backport/backport-4400-to-2.19-dev.

yuancu added a commit to yuancu/sql-plugin that referenced this pull request Oct 22, 2025
…roject#4400)

* WIP: implementing case range analyzer

Signed-off-by: Yuanchun Shen <[email protected]>

* Correct case analyzer

Signed-off-by: Yuanchun Shen <[email protected]>

* Create bucket aggregation parsers that supports parsing nested sub aggregations

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix unit tests

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix parsers to multi-range cases

Signed-off-by: Yuanchun Shen <[email protected]>

* Update leaf bucket parser

Signed-off-by: Yuanchun Shen <[email protected]>

* Unit test case range analyzer

Signed-off-by: Yuanchun Shen <[email protected]>

* Add explain ITs for pushing down case in aggregations

Signed-off-by: Yuanchun Shen <[email protected]>

* Update CaseRangeAnalyzerTest

Signed-off-by: Yuanchun Shen <[email protected]>

* Add a yaml test that replicates issue 4201

Signed-off-by: Yuanchun Shen <[email protected]>

* Add integration tests for case in aggregation

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix unit tests

Signed-off-by: Yuanchun Shen <[email protected]>

* Add a patch to CalcitePPLCaseFunctionIT

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate all composite aggregation parser usage to bucket aggregate parser

Signed-off-by: Yuanchun Shen <[email protected]>

* Create a parent abstract classes for BucketAggregationParsers

Signed-off-by: Yuanchun Shen <[email protected]>

* Remove an unnecessary bucket agg in AggregationQueryBuilder

Signed-off-by: Yuanchun Shen <[email protected]>

* Test pushing down case where there exists null values

Signed-off-by: Yuanchun Shen <[email protected]>

* Return empty in CaseRangeAnalyzer to unblock the rest pushdown
- Additionally test number as result expressions

Signed-off-by: Yuanchun Shen <[email protected]>

* Document limitations of pushding case as range queries

Signed-off-by: Yuanchun Shen <[email protected]>

* Make case pushdown a private method

Signed-off-by: Yuanchun Shen <[email protected]>

* Chores: remove unused helper method

Signed-off-by: Yuanchun Shen <[email protected]>

* Unify logics for creating nested aggregations

Signed-off-by: Yuanchun Shen <[email protected]>

* Remove a note in condition.rst

Signed-off-by: Yuanchun Shen <[email protected]>

* Optmize range aggregation

Signed-off-by: Yuanchun Shen <[email protected]>

* Ignore testNestedAggregationsExplain when pushdown is disabled

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix explain ITs after merge

Signed-off-by: Yuanchun Shen <[email protected]>

---------

Signed-off-by: Yuanchun Shen <[email protected]>
(cherry picked from commit 18ab4dc)
yuancu added a commit to yuancu/sql-plugin that referenced this pull request Oct 22, 2025
…roject#4400)

* WIP: implementing case range analyzer

Signed-off-by: Yuanchun Shen <[email protected]>

* Correct case analyzer

Signed-off-by: Yuanchun Shen <[email protected]>

* Create bucket aggregation parsers that supports parsing nested sub aggregations

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix unit tests

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix parsers to multi-range cases

Signed-off-by: Yuanchun Shen <[email protected]>

* Update leaf bucket parser

Signed-off-by: Yuanchun Shen <[email protected]>

* Unit test case range analyzer

Signed-off-by: Yuanchun Shen <[email protected]>

* Add explain ITs for pushing down case in aggregations

Signed-off-by: Yuanchun Shen <[email protected]>

* Update CaseRangeAnalyzerTest

Signed-off-by: Yuanchun Shen <[email protected]>

* Add a yaml test that replicates issue 4201

Signed-off-by: Yuanchun Shen <[email protected]>

* Add integration tests for case in aggregation

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix unit tests

Signed-off-by: Yuanchun Shen <[email protected]>

* Add a patch to CalcitePPLCaseFunctionIT

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate all composite aggregation parser usage to bucket aggregate parser

Signed-off-by: Yuanchun Shen <[email protected]>

* Create a parent abstract classes for BucketAggregationParsers

Signed-off-by: Yuanchun Shen <[email protected]>

* Remove an unnecessary bucket agg in AggregationQueryBuilder

Signed-off-by: Yuanchun Shen <[email protected]>

* Test pushing down case where there exists null values

Signed-off-by: Yuanchun Shen <[email protected]>

* Return empty in CaseRangeAnalyzer to unblock the rest pushdown
- Additionally test number as result expressions

Signed-off-by: Yuanchun Shen <[email protected]>

* Document limitations of pushding case as range queries

Signed-off-by: Yuanchun Shen <[email protected]>

* Make case pushdown a private method

Signed-off-by: Yuanchun Shen <[email protected]>

* Chores: remove unused helper method

Signed-off-by: Yuanchun Shen <[email protected]>

* Unify logics for creating nested aggregations

Signed-off-by: Yuanchun Shen <[email protected]>

* Remove a note in condition.rst

Signed-off-by: Yuanchun Shen <[email protected]>

* Optmize range aggregation

Signed-off-by: Yuanchun Shen <[email protected]>

* Ignore testNestedAggregationsExplain when pushdown is disabled

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix explain ITs after merge

Signed-off-by: Yuanchun Shen <[email protected]>

---------

Signed-off-by: Yuanchun Shen <[email protected]>
(cherry picked from commit 18ab4dc)
@LantaoJin LantaoJin added the backport-manually Filed a PR to backport manually. label Oct 23, 2025
yuancu added a commit to yuancu/sql-plugin that referenced this pull request Oct 24, 2025
…roject#4400)

* WIP: implementing case range analyzer

Signed-off-by: Yuanchun Shen <[email protected]>

* Correct case analyzer

Signed-off-by: Yuanchun Shen <[email protected]>

* Create bucket aggregation parsers that supports parsing nested sub aggregations

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix unit tests

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix parsers to multi-range cases

Signed-off-by: Yuanchun Shen <[email protected]>

* Update leaf bucket parser

Signed-off-by: Yuanchun Shen <[email protected]>

* Unit test case range analyzer

Signed-off-by: Yuanchun Shen <[email protected]>

* Add explain ITs for pushing down case in aggregations

Signed-off-by: Yuanchun Shen <[email protected]>

* Update CaseRangeAnalyzerTest

Signed-off-by: Yuanchun Shen <[email protected]>

* Add a yaml test that replicates issue 4201

Signed-off-by: Yuanchun Shen <[email protected]>

* Add integration tests for case in aggregation

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix unit tests

Signed-off-by: Yuanchun Shen <[email protected]>

* Add a patch to CalcitePPLCaseFunctionIT

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate all composite aggregation parser usage to bucket aggregate parser

Signed-off-by: Yuanchun Shen <[email protected]>

* Create a parent abstract classes for BucketAggregationParsers

Signed-off-by: Yuanchun Shen <[email protected]>

* Remove an unnecessary bucket agg in AggregationQueryBuilder

Signed-off-by: Yuanchun Shen <[email protected]>

* Test pushing down case where there exists null values

Signed-off-by: Yuanchun Shen <[email protected]>

* Return empty in CaseRangeAnalyzer to unblock the rest pushdown
- Additionally test number as result expressions

Signed-off-by: Yuanchun Shen <[email protected]>

* Document limitations of pushding case as range queries

Signed-off-by: Yuanchun Shen <[email protected]>

* Make case pushdown a private method

Signed-off-by: Yuanchun Shen <[email protected]>

* Chores: remove unused helper method

Signed-off-by: Yuanchun Shen <[email protected]>

* Unify logics for creating nested aggregations

Signed-off-by: Yuanchun Shen <[email protected]>

* Remove a note in condition.rst

Signed-off-by: Yuanchun Shen <[email protected]>

* Optmize range aggregation

Signed-off-by: Yuanchun Shen <[email protected]>

* Ignore testNestedAggregationsExplain when pushdown is disabled

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix explain ITs after merge

Signed-off-by: Yuanchun Shen <[email protected]>

---------

Signed-off-by: Yuanchun Shen <[email protected]>
(cherry picked from commit 18ab4dc)

# Conflicts:
#	integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalciteExplainIT.java
qianheng-aws pushed a commit that referenced this pull request Oct 24, 2025
…ueries (#4400) (#4630)

* Pushdown case function in aggregations as range queries (#4400)

* WIP: implementing case range analyzer

Signed-off-by: Yuanchun Shen <[email protected]>

* Correct case analyzer

Signed-off-by: Yuanchun Shen <[email protected]>

* Create bucket aggregation parsers that supports parsing nested sub aggregations

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix unit tests

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix parsers to multi-range cases

Signed-off-by: Yuanchun Shen <[email protected]>

* Update leaf bucket parser

Signed-off-by: Yuanchun Shen <[email protected]>

* Unit test case range analyzer

Signed-off-by: Yuanchun Shen <[email protected]>

* Add explain ITs for pushing down case in aggregations

Signed-off-by: Yuanchun Shen <[email protected]>

* Update CaseRangeAnalyzerTest

Signed-off-by: Yuanchun Shen <[email protected]>

* Add a yaml test that replicates issue 4201

Signed-off-by: Yuanchun Shen <[email protected]>

* Add integration tests for case in aggregation

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix unit tests

Signed-off-by: Yuanchun Shen <[email protected]>

* Add a patch to CalcitePPLCaseFunctionIT

Signed-off-by: Yuanchun Shen <[email protected]>

* Migrate all composite aggregation parser usage to bucket aggregate parser

Signed-off-by: Yuanchun Shen <[email protected]>

* Create a parent abstract classes for BucketAggregationParsers

Signed-off-by: Yuanchun Shen <[email protected]>

* Remove an unnecessary bucket agg in AggregationQueryBuilder

Signed-off-by: Yuanchun Shen <[email protected]>

* Test pushing down case where there exists null values

Signed-off-by: Yuanchun Shen <[email protected]>

* Return empty in CaseRangeAnalyzer to unblock the rest pushdown
- Additionally test number as result expressions

Signed-off-by: Yuanchun Shen <[email protected]>

* Document limitations of pushding case as range queries

Signed-off-by: Yuanchun Shen <[email protected]>

* Make case pushdown a private method

Signed-off-by: Yuanchun Shen <[email protected]>

* Chores: remove unused helper method

Signed-off-by: Yuanchun Shen <[email protected]>

* Unify logics for creating nested aggregations

Signed-off-by: Yuanchun Shen <[email protected]>

* Remove a note in condition.rst

Signed-off-by: Yuanchun Shen <[email protected]>

* Optmize range aggregation

Signed-off-by: Yuanchun Shen <[email protected]>

* Ignore testNestedAggregationsExplain when pushdown is disabled

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix explain ITs after merge

Signed-off-by: Yuanchun Shen <[email protected]>

---------

Signed-off-by: Yuanchun Shen <[email protected]>
(cherry picked from commit 18ab4dc)

# Conflicts:
#	integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalciteExplainIT.java

* Downgrade langauge level to java 11

Signed-off-by: Yuanchun Shen <[email protected]>

* Delete an IT due to system-incompatible formatting issue

Signed-off-by: Yuanchun Shen <[email protected]>

---------

Signed-off-by: Yuanchun Shen <[email protected]>
asifabashar added a commit to asifabashar/sql that referenced this pull request Oct 28, 2025
* default-main: (34 commits)
  Enhance dynamic source clause to support only metadata filters (opensearch-project#4554)
  Make nested alias type support referring to outer context (opensearch-project#4673)
  Update big5 ppl queries and check plans (opensearch-project#4668)
  Support push down sort after limit (opensearch-project#4657)
  Use table scan rowType in filter pushdown could fix rename issue (opensearch-project#4670)
  Fix: Support Alias Fields in MIN, MAX, FIRST, LAST, and TAKE Aggregations (opensearch-project#4621)
  Fix bin nested fields issue (opensearch-project#4606)
  Add `per_minute`, `per_hour`, `per_day` function support (opensearch-project#4531)
  Pushdown sort aggregate metrics (opensearch-project#4603)
  Followup: Change ComparableLinkedHashMap to compare Key than Value (opensearch-project#4648)
  Mitigate the CI failure caused by 500 Internal Server Error (opensearch-project#4646)
  Allow renaming group-by fields to existing field names (opensearch-project#4586)
  Publish internal modules separately for downstream reuse (opensearch-project#4484)
  Revert "Update grammar files and developer guide (opensearch-project#4301)" (opensearch-project#4643)
  Support Automatic Type Conversion for REX/SPATH/PARSE Command Extractions (opensearch-project#4599)
  Replace all dots in fields of table scan's PhysType (opensearch-project#4633)
  Return comparable LinkedHashMap in `valueForCalcite()` of ExprTupleValue (opensearch-project#4629)
  Refactor JsonExtractAllFunctionIT and MapConcatFunctionIT (opensearch-project#4623)
  Pushdown case function in aggregations as range queries (opensearch-project#4400)
  Update GEOIP function to support IP types as input (opensearch-project#4613)
  ...

# Conflicts:
#	docs/user/ppl/functions/conversion.rst
asifabashar added a commit to asifabashar/sql that referenced this pull request Oct 28, 2025
* default-main: (34 commits)
  Enhance dynamic source clause to support only metadata filters (opensearch-project#4554)
  Make nested alias type support referring to outer context (opensearch-project#4673)
  Update big5 ppl queries and check plans (opensearch-project#4668)
  Support push down sort after limit (opensearch-project#4657)
  Use table scan rowType in filter pushdown could fix rename issue (opensearch-project#4670)
  Fix: Support Alias Fields in MIN, MAX, FIRST, LAST, and TAKE Aggregations (opensearch-project#4621)
  Fix bin nested fields issue (opensearch-project#4606)
  Add `per_minute`, `per_hour`, `per_day` function support (opensearch-project#4531)
  Pushdown sort aggregate metrics (opensearch-project#4603)
  Followup: Change ComparableLinkedHashMap to compare Key than Value (opensearch-project#4648)
  Mitigate the CI failure caused by 500 Internal Server Error (opensearch-project#4646)
  Allow renaming group-by fields to existing field names (opensearch-project#4586)
  Publish internal modules separately for downstream reuse (opensearch-project#4484)
  Revert "Update grammar files and developer guide (opensearch-project#4301)" (opensearch-project#4643)
  Support Automatic Type Conversion for REX/SPATH/PARSE Command Extractions (opensearch-project#4599)
  Replace all dots in fields of table scan's PhysType (opensearch-project#4633)
  Return comparable LinkedHashMap in `valueForCalcite()` of ExprTupleValue (opensearch-project#4629)
  Refactor JsonExtractAllFunctionIT and MapConcatFunctionIT (opensearch-project#4623)
  Pushdown case function in aggregations as range queries (opensearch-project#4400)
  Update GEOIP function to support IP types as input (opensearch-project#4613)
  ...

Signed-off-by: Asif Bashar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.19-dev backport-failed backport-manually Filed a PR to backport manually. enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Support nested sub-aggregation parser [FEATURE] Support case command pushdown to range agg

3 participants