mikemccand commented on code in PR #12738:
URL: https://github.com/apache/lucene/pull/12738#discussion_r1378599798
##########
lucene/core/src/java/org/apache/lucene/util/fst/NodeHash.java:
##########
@@ -214,7 +222,13 @@ private long hash(long node) throws IOException {
* Compares an unfrozen node (UnCompiledNode) with a frozen node at byte
location address (long),
* returning true if they are equal.
*/
- private boolean nodesEqual(FSTCompiler.UnCompiledNode<T> node, long address)
throws IOException {
+ private boolean nodesEqual(
+ PagedGrowableHash table, FSTCompiler.UnCompiledNode<T> node, long
address)
+ throws IOException {
+ // nocommit: this is non-optimal, we should have a BytesReader that wraps
and read the
+ // ByteBlockPool directly
+ byte[] bytes = table.getBytes(address);
Review Comment:
Ahhh that's right, the hash map must retain the true FST offset since that's
what future added nodes must link to!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]