MCPcopy Create free account
hub / github.com/apache/calcite / not

Method not

core/src/main/java/org/apache/calcite/rex/RexUtil.java:2163–2170  ·  view source on GitHub ↗

Negates a logical expression by adding or removing a NOT.

(RexNode e)

Source from the content-addressed store, hash-verified

2161
2162 /** Negates a logical expression by adding or removing a NOT. */
2163 public static RexNode not(RexNode e) {
2164 switch (e.getKind()) {
2165 case NOT:
2166 return ((RexCall) e).getOperands().get(0);
2167 default:
2168 return addNot(e);
2169 }
2170 }
2171
2172 private static RexNode addNot(RexNode e) {
2173 return new RexCall(e.getType(), SqlStdOperatorTable.NOT, ImmutableList.of(e));

Callers 15

notMethod · 0.95
andNotMethod · 0.95
notFnMethod · 0.95
rewriteQueryMethod · 0.95
rewriteQueryMethod · 0.95
testQuery02ConversionMethod · 0.45
rewriteInMethod · 0.45
andFirstNotRestMethod · 0.45
getInverseOperatorMethod · 0.45
testValuesMethod · 0.45
testSelectIsNotDdlMethod · 0.45

Calls 9

addNotMethod · 0.95
getPosMethod · 0.95
makeLiteralMethod · 0.80
makeCallMethod · 0.80
getMethod · 0.65
getKindMethod · 0.45
getOperandsMethod · 0.45
isAlwaysTrueMethod · 0.45
isAlwaysFalseMethod · 0.45

Tested by 13

testQuery02ConversionMethod · 0.36
testValuesMethod · 0.36
testSelectIsNotDdlMethod · 0.36
testInsertSelectMethod · 0.36
testInsertValuesMethod · 0.36
testExplainInsertMethod · 0.36
testUpsertValuesMethod · 0.36
testDeleteMethod · 0.36
testMergeSelectSourceMethod · 0.36