Github user JamesRTaylor commented on a diff in the pull request:
https://github.com/apache/incubator-phoenix/pull/8#discussion_r10157820
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/expression/LiteralExpression.java
---
@@ -156,6 +162,9 @@ public static LiteralExpression newConstant(Object
value, PDataType type, Intege
throw TypeMismatchException.newException(type, actualType,
value.toString());
}
value = type.toObject(value, actualType);
+ if(type == PDataType.CHAR_ARRAY) {
--- End diff --
Please add the following override to PDataType.BINARY, though:
BINARY("BINARY", Types.BINARY, byte[].class, null) {
@Override
public Integer getMaxLength(Object o) {
if (o == null) {
return null;
}
byte[] value = (byte[]) o;
return value.length;
}
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---