Skip to content

Commit

Permalink
making StarTreeFieldType back to final
Browse files Browse the repository at this point in the history
Signed-off-by: Sandesh Kumar <[email protected]>
  • Loading branch information
sandeshkr419 committed Oct 7, 2024
1 parent ae4393f commit 326400a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.opensearch.index.compositeindex.datacube.startree.index.StarTreeValues;
import org.opensearch.index.compositeindex.datacube.startree.utils.iterator.SortedNumericStarTreeValuesIterator;
import org.opensearch.index.mapper.CompositeDataCubeFieldType;
import org.opensearch.index.mapper.StarTreeMapper;
import org.opensearch.index.query.MatchAllQueryBuilder;
import org.opensearch.index.query.QueryBuilder;
import org.opensearch.index.query.TermQueryBuilder;
Expand Down Expand Up @@ -69,7 +68,7 @@ public static boolean isStarTreeSupported(SearchContext context) {
*/
public static StarTreeQueryContext getStarTreeQueryContext(SearchContext context, SearchSourceBuilder source) throws IOException {
// Current implementation assumes only single star-tree is supported
CompositeDataCubeFieldType compositeMappedFieldType = (StarTreeMapper.StarTreeFieldType) context.mapperService()
CompositeDataCubeFieldType compositeMappedFieldType = (CompositeDataCubeFieldType) context.mapperService()
.getCompositeFieldTypes()
.iterator()
.next();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ protected void parseCreateField(ParseContext context) {
* @opensearch.experimental
*/
@ExperimentalApi
public static class StarTreeFieldType extends CompositeDataCubeFieldType {
public static final class StarTreeFieldType extends CompositeDataCubeFieldType {

private final StarTreeFieldConfiguration starTreeConfig;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ public LeafBucketCollector getStarTreeLeafCollector(LeafReaderContext ctx, LeafB
kahanSummation.add(NumericUtils.sortableLongToDouble(sumValuesIterator.nextValue()));
counts.increment(0, countValueIterator.nextValue()); // Apply the consumer operation (e.g., max, sum)
}

}
}

Expand Down

0 comments on commit 326400a

Please sign in to comment.