NobiGo commented on code in PR #3892:
URL: https://github.com/apache/calcite/pull/3892#discussion_r1697755505


##########
core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java:
##########
@@ -3682,9 +3682,22 @@ static AbstractRexCallImplementor 
of(AbstractRexCallImplementor implementor) {
 
     @Override Expression implementSafe(final RexToLixTranslator translator,
         final RexCall call, final List<Expression> argValueList) {
+      // E.g., "final Boolean resultValue = (callValue == null) ? null : 
!callValue"
       final Expression expression =
           implementor.implementSafe(translator, call, argValueList);
-      return Expressions.not(expression);
+      final ParameterExpression callValue =

Review Comment:
   Hi @mihaibudiu, this is related to the `IS NOT JSON VALUE` function.  In 
Calcite, implement this function  by:
   
   ```
   map.put(IS_NOT_JSON_VALUE,
             NotImplementor.of(
                 new MethodImplementor(BuiltInMethod.IS_JSON_VALUE.method,
                     NullPolicy.NONE, false)));
   ```
   NoT is implemented through NotImplementer.
   Before this PR, the JsonFunctions‘ isJsonValue function is always TRUE or 
FALSE. So the NotImplementor only needs to do `!(isJsonValue )`. 
   But After this PR, JsonFunctions‘ isJsonValue will return NULL. So the 
NotImplementor needs to change to `isJsonValue == null? isJsonValue : 
!(isJsonValue ) ` make sure `null IS NOT JSON VALUE` returns null.



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

Reply via email to