Skip to content

Make pack methods public for BigIntegerPoint and HalfFloatPoint #14784

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

Merged
merged 8 commits into from
Jun 18, 2025

Conversation

prudhvigodithi
Copy link
Contributor

@prudhvigodithi prudhvigodithi commented Jun 15, 2025

Description

Following this commit 94c76c7 make pack methods public for BigIntegerPoint and HalfFloatPoint.

Please let me know if there’s any restriction in sandbox packages that requires methods to be non-public.

Example (with IntPoint) with public pack we can directly use as follows

IntPoint.pack(new int[] { l }).bytes,
IntPoint.pack(new int[] { u }).bytes,

Without pack

// Create byte array
byte[] lowerPoint = new byte[HalfFloatPoint.BYTES];
byte[] upperPoint = new byte[HalfFloatPoint.BYTES];
// Encode value into bytes
HalfFloatPoint.encodeDimension(l, lowerPoint, 0);
HalfFloatPoint.encodeDimension(u, upperPoint, 0);

Once this PR is merged we can:

HalfFloatPoint.pack(new int[] { l }).bytes,
HalfFloatPoint.pack(new int[] { u }).bytes,

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Copy link

This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR.

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
@github-actions github-actions bot added this to the 10.3.0 milestone Jun 15, 2025
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
@prudhvigodithi
Copy link
Contributor Author

I have just updated the CHANGES.txt adding to 10.2.2, please let me know if this is ok else I can change back to 10.3.0.

@jpountz
Copy link
Contributor

jpountz commented Jun 16, 2025

I'm good with the change, but I'd put the change in 10.3 instead of 10.2.2 since it's a new feature rather than a bug fix.

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
@prudhvigodithi
Copy link
Contributor Author

Thanks Adrien, updated the CHANGES.txt moving to 10.3.0.
@getsaurabh02

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
@prudhvigodithi
Copy link
Contributor Author

Just pushed a commit to fix the conflicts. @jpountz a gentle follow up to see if we are ok to merge this change.
Thanks

@jpountz jpountz merged commit c7ac4d7 into apache:main Jun 18, 2025
7 checks passed
jpountz pushed a commit that referenced this pull request Jun 18, 2025
…#14784)

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants