thecoop commented on code in PR #14761: URL: https://github.com/apache/lucene/pull/14761#discussion_r2132155406
########## lucene/core/src/java/org/apache/lucene/util/FloatComparator.java: ########## @@ -14,21 +14,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.queries.spans; +package org.apache.lucene.util; -import org.apache.lucene.util.PriorityQueue; +import java.util.Comparator; -class SpanPositionQueue extends PriorityQueue<Spans> { - SpanPositionQueue(int maxSize) { - super(maxSize); // do not prepopulate +public interface FloatComparator { Review Comment: There are no JCL methods to compare floats without converting them to doubles first, so this enables direct float comparisons. The interface `compare` method isn't actually used here, but it seems remiss to not have a `FloatComparator` interface without a `compare` method defined. -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org