diff --git a/hollow/src/main/java/com/netflix/hollow/tools/diff/HollowDiff.java b/hollow/src/main/java/com/netflix/hollow/tools/diff/HollowDiff.java index 69d0f5981c..fe076c2562 100644 --- a/hollow/src/main/java/com/netflix/hollow/tools/diff/HollowDiff.java +++ b/hollow/src/main/java/com/netflix/hollow/tools/diff/HollowDiff.java @@ -43,7 +43,7 @@ * */ public class HollowDiff { - private final EnumSet SINGLE_FIELD_SUPPORTED_TYPES = EnumSet.of(FieldType.INT, FieldType.LONG, FieldType.DOUBLE, FieldType.STRING, FieldType.FLOAT, FieldType.BOOLEAN); + private final EnumSet SINGLE_FIELD_SUPPORTED_TYPES = EnumSet.of(FieldType.INT, FieldType.LONG, FieldType.DOUBLE, FieldType.STRING, FieldType.FLOAT, FieldType.BOOLEAN, FieldType.BYTES); private final Logger log = Logger.getLogger(HollowDiff.class.getName()); private final HollowReadStateEngine fromStateEngine; diff --git a/hollow/src/main/java/com/netflix/hollow/tools/util/ObjectInternPool.java b/hollow/src/main/java/com/netflix/hollow/tools/util/ObjectInternPool.java index af0fb18c5e..b5a7da40de 100644 --- a/hollow/src/main/java/com/netflix/hollow/tools/util/ObjectInternPool.java +++ b/hollow/src/main/java/com/netflix/hollow/tools/util/ObjectInternPool.java @@ -49,6 +49,8 @@ public Object getObject(int ordinal, FieldType type) { return getLong(pointer); case STRING: return getString(pointer); + case BYTES: + return getBytes(pointer); default: throw new IllegalArgumentException("Unknown type " + type); } @@ -82,13 +84,17 @@ public long getLong(long pointer) { } public String getString(long pointer) { + return new String(getBytes(pointer)); + } + + public byte[] getBytes(long pointer) { ByteData byteData = ordinalMap.getByteData().getUnderlyingArray(); int length = VarInt.readVInt(byteData, pointer); byte[] bytes = new byte[length]; for(int i=0;i