mSitkovets commented on a change in pull request #11170:
URL: https://github.com/apache/druid/pull/11170#discussion_r635216136
##########
File path:
processing/src/main/java/org/apache/druid/segment/virtual/SingleLongInputCachingExpressionColumnValueSelector.java
##########
@@ -97,26 +104,30 @@ public long getLong()
@Override
public ExprEval getObject()
{
- // things can still call this even when underlying selector is null (e.g.
ExpressionColumnValueSelector#isNull)
+ boolean cached;
+ boolean currentInputIsNull = false;
if (selector.isNull()) {
- return ExprEval.ofLong(null);
+ cached = cachedIsNull;
+ currentInputIsNull = true;
+ } else {
+ cached = selector.getLong() == lastInput && lastOutput != null;
Review comment:
YES this is much cleaner and less complicated than my solution. Thank
you for your help!
--
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]