gsmiller commented on code in PR #12560:
URL: https://github.com/apache/lucene/pull/12560#discussion_r1327624072


##########
lucene/expressions/src/java/org/apache/lucene/expressions/ExpressionFunctionValues.java:
##########
@@ -39,21 +39,21 @@ class ExpressionFunctionValues extends DoubleValues {
   }
 
   @Override
-  public boolean advanceExact(int doc) {
+  public boolean advanceExact(int doc) throws IOException {
     if (currentDoc == doc) {
       return true;
     }
+    for (DoubleValues v : functionValues) {
+      v.advanceExact(doc);

Review Comment:
   In this layer, yes. But all these DoubleValue instances come from 
`ExpressionValueSource#zeroWhenUnpositioned` (see the setup done in 
`ExpressionValueSource#getValues`). In this PR, I'm proposing pushing down the 
lazy advancing into that layer. Does this make sense? We could keep the lazy 
advance logic up here as well, but I didn't think it was really necessary since 
the delegation to the underlying advancing is now lazy...



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

Reply via email to