From ab522de4d4cdd9e8e94e844e4ba800fe2cbd34a2 Mon Sep 17 00:00:00 2001 From: Sunjeet Date: Tue, 12 Mar 2024 17:04:34 -0700 Subject: [PATCH] Revert "Add support for byte arrays in primary key of history" This reverts commit 0aca0214e29374a6bded16c328c010e447355196. --- .../netflix/hollow/tools/diff/HollowDiff.java | 2 +- .../hollow/tools/util/ObjectInternPool.java | 8 +----- .../hollow/tools/util/SearchUtils.java | 3 +-- .../tools/util/ObjectInternPoolTest.java | 27 ------------------- 4 files changed, 3 insertions(+), 37 deletions(-) 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 fe076c2562..69d0f5981c 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, FieldType.BYTES); + private final EnumSet SINGLE_FIELD_SUPPORTED_TYPES = EnumSet.of(FieldType.INT, FieldType.LONG, FieldType.DOUBLE, FieldType.STRING, FieldType.FLOAT, FieldType.BOOLEAN); 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 94a16c9267..af0fb18c5e 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,8 +49,6 @@ 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); } @@ -84,17 +82,13 @@ 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