romseygeek commented on a change in pull request #1444: URL: https://github.com/apache/lucene-solr/pull/1444#discussion_r413936078
########## File path: lucene/expressions/src/java/org/apache/lucene/expressions/SimpleBindings.java ########## @@ -96,24 +90,51 @@ public DoubleValuesSource getDoubleValuesSource(String name) { case SCORE: return DoubleValuesSource.SCORES; default: - throw new UnsupportedOperationException(); + throw new UnsupportedOperationException(); } } - /** - * Traverses the graph of bindings, checking there are no cycles or missing references - * @throws IllegalArgumentException if the bindings is inconsistent + @Override + public DoubleValuesSource getDoubleValuesSource(String name) { + if (map.containsKey(name) == false) { Review comment: I'm pretty sure this won't be in the hot path - it's part of query setup, not query execution - and I think it reads more clearly. ---------------------------------------------------------------- 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