-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Remove @ExperimentalApi annotations from star-tree related code #18521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
happysubin
wants to merge
1
commit into
opensearch-project:main
Choose a base branch
from
happysubin:cleanup-startree-annotations
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get rid of PublicApi annotation as well? Classes although public, still shouldn't be annotated
PublicApi
I think you will get a trail of classes that might fail to build because they are still marked experimental which is okay to remove experimental as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your review !
However, when I remove the
@PublicApi
annotation and run the build, I get the following errorHow can I resolve this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
org.opensearch.search.startree.filter.DimensionFilter
too is marked as public api. Can we remove publicApi from the chain and see what's the actual class that could be causing this error ?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bharath-techie
I haven’t pushed yet,
I continue removing the
PublicApi
annotation starting fromDimensionFilter
,I end up removing it from the following related classes.
DimensionFilter
,DimensionFilterMapper
,StarTreeNode
,StarTreeFilter
, andStarTreeQueryContext
Eventually, this leads to the following error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sandeshkr419 @expani
I don't see good options other than marking the chain with public API since we have a reference in QueryShardContext.
Any thoughts ?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I strongly don't like the idea of chaining up all the classes as
@PublicApi
as a workaround.Thinking out loud some alternatives:
How about introducing a
CompositeQueryContext
with@PublicApi
annotation. Its implementationStarTreeQueryContext
can be an internal api or with no annotations.QueryShardContext
will then holdCompositeQueryContext
instead ofStarTreeQueryContext
.I think this can provide a good abstraction since star-tree is also an implementation of composite index. Introducing
CompositeQueryContext
can hide the star-tree related details and also pave way for future implementations similar to star-tree without having to bundle up query context with additional information.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't solve the problem by the way , still the chain of
StarTreeQueryContext
needs to be PublicApi sinceCompositeQueryContext
is public API.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example if we do the above change , we still have the following chain that needs to be solved
CompositeDataCubeFieldType
-->StarTreeQueryContext
Dimension
->CompositeDataCubeFieldType
DimensionDataType
->Dimension
Metric
->CompositeDataCubeFieldType
MetricStat
->Metric
And there is an additional chain :
CompositeIndexSettings
-->IndicesService
But it does remove the chain in same package chain -
DimensionFilter, StarTreeFilter, DimensionFilterMapper
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically exposing a sub-set of interfaces as
@PublicAPI
is still better (may not be ideal - and we can increment on this) than exposing all the implementations as@PublicAPI
.