clintropolis commented on code in PR #15182:
URL: https://github.com/apache/druid/pull/15182#discussion_r1363223059
##########
sql/src/main/java/org/apache/druid/sql/calcite/expression/Expressions.java:
##########
@@ -488,13 +512,23 @@ private static DimFilter toSimpleLeafFilter(
final SqlKind kind = rexNode.getKind();
if (kind == SqlKind.IS_TRUE || kind == SqlKind.IS_NOT_FALSE) {
+ if (NullHandling.useThreeValueLogic()) {
+ // use expression filter to get istrue or notfalse expressions for
correct 3vl behavior
+ return toExpressionLeafFilter(plannerContext, rowSignature, rexNode);
+ }
+ // legacy behavior
return toSimpleLeafFilter(
plannerContext,
rowSignature,
virtualColumnRegistry,
Iterables.getOnlyElement(((RexCall) rexNode).getOperands())
);
} else if (kind == SqlKind.IS_FALSE || kind == SqlKind.IS_NOT_TRUE) {
+ if (NullHandling.useThreeValueLogic()) {
+ // use expression filter to get isfalse or nottrue expressions for
correct 3vl behavior
Review Comment:
ah, i was being consistent with the native expression names:
*
https://github.com/apache/druid/blob/master/processing/src/main/java/org/apache/druid/math/expr/Function.java#L2402
*
https://github.com/apache/druid/blob/master/processing/src/main/java/org/apache/druid/math/expr/Function.java#L2434
*
https://github.com/apache/druid/blob/master/processing/src/main/java/org/apache/druid/math/expr/Function.java#L2338
*
https://github.com/apache/druid/blob/master/processing/src/main/java/org/apache/druid/math/expr/Function.java#L2370
--
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]