gianm commented on code in PR #14734:
URL: https://github.com/apache/druid/pull/14734#discussion_r1297758809


##########
docs/querying/math-expr.md:
##########
@@ -337,4 +328,11 @@ SQL compatible behavior:
 * `'troo' && 'true'` -> `0`
 * `'troo' || 'true'` -> `1`
 
+Prior to the 28 release of Apache Druid, boolean function expressions had 
inconsistent handling of true and false values. The logical 'and' and 'or' 
operators behaved in a manner that was incompatible with SQL, even if SQL 
compatible null handling mode (`druid.generic.useDefaultValueForNull=false`) 
was enabled. Logical operators would also pass through their input values 
similar to many scripting languages, and treated `null` as false, which would 
result in some rather strange behavior. Other boolean operations, such as 
comparisons and equality, retained their input types (e.g. `DOUBLE` comparison 
would produce `1.0` for true and `0.0` for false), while many other boolean 
functions strictly produced `LONG` typed values of `1` for true and `0` for 
false. This legacy mode can be enabled by setting 
`druid.expressions.useStrictBooleans=false`.

Review Comment:
   "Prior to Druid 28.0.0" is more consistent with how we write this kind of 
stuff elsewhere.
   
   Also, I think this paragraph would read better if switched into the present 
tense, and written as if it's describing `druid.expressions.useStrictBooleans = 
false`, not as if it's describing Druid prior to 28.0.0. (Still include a 
mention that the default changed in 28.0.0 though.)



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