blerer commented on PR #15469:
URL: https://github.com/apache/lucene/pull/15469#issuecomment-3744754593

   From an API point of view, I feel that `intoBitSet()` should never had been 
part of the `DocIdSetIterator`. It is method used to read data from the 
iterator into a `FixedBitSet`. It is somehow similar to adding an `intoList` 
method to the `Iterator` interface.
   I suspect that the main reason behind its existence was to allow people to 
optimize its execution. Which seems to be confirmed by git history: `Let 
`DocIdSetIterator` optimize loading into a FixedBitSet. (#14069) `
   Considering the amount of time this method is overridden, I do not think 
that we can say that this method was not supposed to be overridden. Therefore, 
if somebody decorate your implementation without delegating to its 
`intoBitSet()`  the performance improvement will be lost silently.
   Now considering the current state of the code it feels to me that it is 
probably safer to avoid delegating `intoBitSet()` as it will ignore 
optimizations but guarantee that the behavior is correct. What do you think?
     


-- 
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]

Reply via email to