forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
- Loading branch information
1 parent
8d969ca
commit e44d892
Showing
6 changed files
with
100 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 0 additions & 73 deletions
73
...ava/org/opensearch/index/compositeindex/datacube/startree/utils/StarTreeBuilderUtils.java
This file was deleted.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
...r/src/main/java/org/opensearch/index/compositeindex/datacube/startree/utils/TreeNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
package org.opensearch.index.compositeindex.datacube.startree.utils; | ||
|
||
import org.opensearch.common.annotation.ExperimentalApi; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* /** | ||
* Represents a node in a tree data structure, specifically designed for a star-tree implementation. | ||
* A star-tree node will represent both star and non-star nodes. | ||
* | ||
* @opensearch.experimental | ||
*/ | ||
@ExperimentalApi | ||
public class TreeNode { | ||
|
||
public static final int ALL = -1; | ||
|
||
/** | ||
* The dimension id for the dimension (field) associated with this star-tree node. | ||
*/ | ||
public int dimensionId = ALL; | ||
|
||
/** | ||
* The starting document id (inclusive) associated with this star-tree node. | ||
*/ | ||
public int startDocId = ALL; | ||
|
||
/** | ||
* The ending document id (exclusive) associated with this star-tree node. | ||
*/ | ||
public int endDocId = ALL; | ||
|
||
/** | ||
* The aggregated document id associated with this star-tree node. | ||
*/ | ||
public int aggregatedDocId = ALL; | ||
|
||
/** | ||
* The child dimension identifier associated with this star-tree node. | ||
*/ | ||
public int childDimensionId = ALL; | ||
|
||
/** | ||
* The value of the dimension associated with this star-tree node. | ||
*/ | ||
public long dimensionValue = ALL; | ||
|
||
/** | ||
* A flag indicating whether this node is a star node (a node that represents an aggregation of all dimensions). | ||
*/ | ||
public boolean isStarNode = false; | ||
|
||
/** | ||
* A map containing the child nodes of this star-tree node, keyed by their dimension id. | ||
*/ | ||
public Map<Long, TreeNode> children; | ||
} |