mikemccand commented on a change in pull request #1613: URL: https://github.com/apache/lucene-solr/pull/1613#discussion_r447992669
########## File path: lucene/expressions/src/java/org/apache/lucene/expressions/ExpressionFunctionValues.java ########## @@ -38,14 +41,23 @@ @Override public boolean advanceExact(int doc) throws IOException { + if (currentDoc == doc) { + return true; + } for (DoubleValues v : functionValues) { v.advanceExact(doc); } + currentDoc = doc; + computed = false; return true; } @Override public double doubleValue() { - return expression.evaluate(functionValues); + if (!computed) { Review comment: Can we use `computed == false` instead to improve readability by possibly aged eyes and reduce risk of future bugs? ---------------------------------------------------------------- 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. 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