Github user StevenMPhillips commented on a diff in the pull request:

    https://github.com/apache/drill/pull/509#discussion_r64940411
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/expr/EvaluationVisitor.java 
---
    @@ -811,7 +811,7 @@ public HoldingContainer visitFunctionCall(FunctionCall 
call, ClassGenerator<?> g
         @Override
         public HoldingContainer 
visitFunctionHolderExpression(FunctionHolderExpression holder, 
ClassGenerator<?> generator) throws RuntimeException {
           HoldingContainer hc = getPrevious(holder, generator.getMappingSet());
    -      if (hc == null) {
    +      if (hc == null || holder.isRandom()) {
    --- End diff --
    
    I think this change is not sufficient to cover all cases. If random() is 
just part of the expression, then this won't help. For example, the expression 
2 * random().
    
    I think a better way to fix this would be to modify 
EqualityVisitor.visitFunctionHolderExpression() to return false if the function 
is random. That way any expression which contains a random function will never 
be considered equal to another expression.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to