chunweilei commented on a change in pull request #1182: [CALCITE-2292] Query
result is wrong when table is implemented with F…
URL: https://github.com/apache/calcite/pull/1182#discussion_r278919079
##########
File path:
core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java
##########
@@ -727,6 +727,10 @@ private NullAs negate(NullAs nullAs) {
return NullAs.TRUE;
case TRUE:
return NullAs.FALSE;
+ case IS_NULL:
+ return NullAs.IS_NOT_NULL;
+ case IS_NOT_NULL:
+ return NullAs.IS_NULL;
default:
return nullAs;
Review comment:
Before this change, the generated code for conditions like `name like 'ss'
and name not like 'xx'` is
`inp1_ == null || inp1_ != null ? (Boolean) null : Boolean.TRUE)`
which is wrong because it always return null.
After this change it becomes
`(inp1_ == null ? (Boolean) null : Boolean.TRUE) : Boolean.FALSE`.
----------------------------------------------------------------
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]
With regards,
Apache Git Services