Github user synhershko commented on the pull request:

    https://github.com/apache/lucenenet/pull/92#issuecomment-73764768
  
    @guidotag this is mainly why I haven't pulled this in yet. I wasn't the one 
to bring this PQ implementation in so I wanted to review this carefully and 
haven't got the time to do that just yet.
    
    Take a look here: 
https://github.com/apache/lucenenet/commit/0471466e0719b8f828e89fc7edaa481ad75ac2d8#diff-86df47eb5fd9dabe41b7624bcb97587aR362
    
    This is another usage of the same PQ - it basically relies on `T` 
implementing `IComparable` - so while what you are suggesting is true, it is 
probably way more trickier than you think.
    
    The right plan of attack here is to switch to using `IComparer<T>` (passed 
via a mandatory ctor param)
    
    As a side-note, I'd very much like to verify this PQ implementation. I 
don't believe we have tests for it, and since its going to be quite central I 
want to validate its correctness, performance and thread-safety guarantees. 
Worth looking up in the history who brought it in and take it from there /cc 
@paulirwin 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to