msfroh commented on issue #15452:
URL: https://github.com/apache/lucene/issues/15452#issuecomment-3578008117

   Coincidentally, I noticed a similar thing with FilterWeight just yesterday: 
https://github.com/apache/lucene/issues/15450
   
   It looks like FilterIndexInput was discussed in 
https://github.com/apache/lucene/pull/11958#discussion_r1029188569.
   
   I appreciate the idea that non-abstract methods shouldn't be delegated, 
because the base implementation should be functionally correct (since they just 
rely on behavior of the abstract methods). On the other hand, we miss out on 
potential optimizations in subclasses (unless we specifically delegate them in 
our `Filter*` subclasses).
   
   I can see reasonable arguments pointing both ways, but right now the Filter* 
classes are inconsistent. For example, if we do decide that only abstract 
methods should be delegated, then we should stop delegating `matches` in 
FilterWeight. 
   
   I think that we can reasonably create one static test implementation for all 
`Filter*` classes to ensure that they either delegate all non-final methods or 
they only delegate abstract methods. (I suppose we could just generate 
`Filter*` classes that do one or the other too.)


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