Skip to content

Make pack methods public for BigIntegerPoint and HalfFloatPoint#14784

Merged
jpountz merged 8 commits intoapache:mainfrom
prudhvigodithi:codechange
Jun 18, 2025
Merged

Make pack methods public for BigIntegerPoint and HalfFloatPoint#14784
jpountz merged 8 commits intoapache:mainfrom
prudhvigodithi:codechange

Conversation

@prudhvigodithi
Copy link
Copy Markdown
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>
@github-actions
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

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