stoty commented on a change in pull request #1342:
URL: https://github.com/apache/phoenix/pull/1342#discussion_r745328378
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/schema/types/PBinary.java
##########
@@ -36,11 +36,13 @@ private PBinary() {
}
@Override
- public void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType
actualType, Integer actualMaxLength,
- Integer actualScale, SortOrder actualModifier, Integer
desiredMaxLength, Integer desiredScale,
- SortOrder expectedModifier) {
- PVarbinary.INSTANCE.coerceBytes(ptr, o, actualType, actualMaxLength,
actualScale, actualModifier, desiredMaxLength, desiredScale, expectedModifier);
- if (null != desiredMaxLength && null != expectedModifier) {
+ public void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType
actualType,
+ Integer actualMaxLength, Integer actualScale, SortOrder
actualModifier,
+ Integer desiredMaxLength, Integer desiredScale, SortOrder
expectedModifier) {
+ PVarbinary.INSTANCE.coerceBytes(ptr, o, actualType, actualMaxLength,
actualScale,
+ actualModifier, desiredMaxLength, desiredScale,
expectedModifier);
+ if ((o != null || ptr.getLength() > 0)
Review comment:
The `o != null` check seems redundant.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]