kgyrtkirk commented on code in PR #15552:
URL: https://github.com/apache/druid/pull/15552#discussion_r1425856837


##########
processing/src/main/java/org/apache/druid/math/expr/ConstantExpr.java:
##########
@@ -464,15 +473,18 @@ public String toString()
 
 class ComplexExpr extends ConstantExpr<Object>
 {
+  final ExprEval expr;

Review Comment:
   its not included in equals / hashCode as its a computed value from the 
`value` constructor argument;
   
   as a matter of fact... `ConstantExpr` also has an `outputType` field which 
is also ignored in the `equals` / `hashCode` stuff - as that is passed in as a 
constructor parameter - actually this could probably be refactored to remove 
that field; however I'm not sure what benefits that would give...
   
   the other way around could be to build the `ContantExpr` on top of an 
`ExprEval` - and use `ExprEval.value()` to get the inner value - but that 
approach would not like how the current `BigIntegerExpr` 
[works](https://github.com/apache/druid/blob/d5b1b5bc8e751b8a45b2a2bf5a02ee2018968a9f/processing/src/main/java/org/apache/druid/math/expr/ConstantExpr.java#L126)...
   
   
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to