Block block = new Block(context)
.comment("IS DISTINCT FROM")
.comment("left")
.append(generatorContext.generate(left))
.append(new IfStatement(context,
new Block(context).getVariable("wasNull"),
new Block(context)
.pop(leftType.getJavaType())
.putVariable("wasNull", false)
.comment("right is not null")
.append(generatorContext.generate(right))
.pop(rightType.getJavaType())
.getVariable("wasNull")
.invokeStatic(CompilerOperations.class, "not", boolean.class, boolean.class),
new Block(context)
.comment("right")
.append(generatorContext.generate(right))
.append(new IfStatement(context,
new Block(context).getVariable("wasNull"),
new Block(context)
.pop(leftType.getJavaType())
.pop(rightType.getJavaType())
.push(true),