}
if (value == null) {
return isDeterministic ? NULL_EXPRESSION : ND_NULL_EXPRESSION;
}
PDataType type = PDataType.fromLiteral(value);
byte[] b = type.toBytes(value);
if (type.isNull(b)) {
return TYPED_NULL_EXPRESSIONS[type.ordinal() + ( isDeterministic ? 0 : TYPED_NULL_EXPRESSIONS.length/2)];
}
if (type == PDataType.VARCHAR) {
String s = (String) value;