Open sandeshkr419 opened 3 days ago
:x: Gradle check result for d7fbc394c22e0d305804c38f392688a19d251c7f: FAILURE
Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?
Description
This is the draft set of changes which I am utilizing to discuss solution approach here.
The primary challenge to resolve a date histogram with metric aggregation was to figure out how sub-aggregators will get resolve. When resolving a query by star-tree, we lose lthe need of ucene documents and don't utilize
collect()
calls which are used internally to delegate the collection of sub-aggregations to sub-collectors.To mitigate this challenge, I have introduced a wrapper class -
StarTreeBucketCollector
to basically introduce acollectStarEntry(int starTreeEntry, long bucket)
method. This method is then overridden in metric aggregator methods and invoked from parent aggregators (here DateHistogramAggregator).The benefit of this strategy is that this is easily extensible by other bucket aggregators where metric aggregations will be nested. Also, other bucket related utilities are re-useable as it is, it saves the effort of having a separate set of utilities for star tree buckets as the old buckets are utilized here.
Want to take early feedback on this approach.
Note: Things are hard-coded for one example query shape right now
Related Issues
Resolves (https://github.com/opensearch-project/OpenSearch/issues/16552)
Check List
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.