clintropolis commented on code in PR #18334:
URL: https://github.com/apache/druid/pull/18334#discussion_r2246518656


##########
processing/src/main/java/org/apache/druid/segment/virtual/ExpressionVirtualColumn.java:
##########
@@ -449,20 +456,21 @@ public boolean equals(Object o)
         return false;
       }
       Expression that = (Expression) o;
-      return Objects.equals(expressionString, that.expressionString) && 
Objects.equals(outputType, that.outputType);
+      return Objects.equals(parsed.get().stringify(), 
that.parsed.get().stringify())

Review Comment:
   an update, the failures i've seen so far seem related to typed null 
constants (like `NullLongExpr` not being equal to `NullDoubleExpr` or a 
`StringExpr` with a null value), but these all have the same stringified form. 
Not entirely sure how to best fix it, since they are technically different 
`Expr`, but they are equivalent... we might need a method like equals but less 
strict since a given string expression might have multiple possible `Expr` 
forms depending on stuff like for example whether `asSingleThreaded` is called 
or not, etc



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