clintropolis commented on a change in pull request #10370:
URL: https://github.com/apache/druid/pull/10370#discussion_r488172223



##########
File path: 
core/src/main/java/org/apache/druid/math/expr/BinaryLogicalOperatorExpr.java
##########
@@ -57,6 +57,17 @@ protected final double evalDouble(double left, double right)
     // Use Double.compare for more consistent NaN handling.
     return Evals.asDouble(Double.compare(left, right) < 0);
   }
+
+  @Nullable
+  @Override
+  public ExprType getOutputType(InputBindingTypes inputTypes)
+  {
+    ExprType implicitCast = super.getOutputType(inputTypes);
+    if (ExprType.STRING.equals(implicitCast)) {
+      return ExprType.LONG;
+    }
+    return implicitCast;

Review comment:
       >can you elaborate more on this? How will that look like?
   
   Ah, its going to be based on using these methods, just the processors will 
be specialized to deal with the correct type based on the set of input types. 
Since the output type information isn't used for non-vectorized expressions, 
I'm trying to model this as the change I want to see in the world and will 
ensure that this matches the behavior of the vectorized expressions, but I've 
gone ahead and split operator from function auto conversion and changed it to 
match existing behavior for now in case it is necessary, and can always 
consolidate them again in the future.




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

Reply via email to