Skip to content

feat(java): expose index description and statistics#5655

Merged
yanghua merged 2 commits intolance-format:mainfrom
majin1102:index_api
Jan 19, 2026
Merged

feat(java): expose index description and statistics#5655
yanghua merged 2 commits intolance-format:mainfrom
majin1102:index_api

Conversation

@majin1102
Copy link
Contributor

@majin1102 majin1102 commented Jan 7, 2026

This PR is to provide the ability to query index information in the Java ecosystem.

@github-actions github-actions bot added enhancement New feature or request java labels Jan 7, 2026
@majin1102 majin1102 marked this pull request as draft January 7, 2026 14:12
@majin1102 majin1102 marked this pull request as ready for review January 8, 2026 03:33
@majin1102
Copy link
Contributor Author

majin1102 commented Jan 8, 2026

This PR is ready for review.
Please take a look when you have time @yanghua @jackye1995

Copy link
Collaborator

@yanghua yanghua left a comment

Choose a reason for hiding this comment

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

Left some comments.


private IndexCriteria(Builder builder) {
this.forColumn = Optional.ofNullable(builder.forColumn);
this.hasName = Optional.of(builder.hasName);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should it be Optional.ofNullable to avoid NPE? If users do not call builder.hasName(...)

* @param indexName the name of the index
* @return JSON string with index statistics
*/
public String getIndexStatistics(String indexName) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Based on the Python API def index_statistics(self, index_name: str) -> Dict[str, Any]. What about replacing the result type with Map<String, Object> or an Entity like IndexStatistics?

@majin1102
Copy link
Contributor Author

majin1102 commented Jan 17, 2026

Ready for another look @yanghua

Copy link
Collaborator

@yanghua yanghua left a comment

Choose a reason for hiding this comment

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

LGTM

@yanghua yanghua merged commit af8cdfd into lance-format:main Jan 19, 2026
8 checks passed
jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Jan 21, 2026
This PR is to provide the ability to query index information in the Java
ecosystem.

---------

Co-authored-by: majin.nathan <majin.nathan@bytedance.com>
vivek-bharathan pushed a commit to vivek-bharathan/lance that referenced this pull request Feb 2, 2026
This PR is to provide the ability to query index information in the Java
ecosystem.

---------

Co-authored-by: majin.nathan <majin.nathan@bytedance.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request java python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants