From deeefa89eb3e645fd82ce36deaeba62fd0b276b5 Mon Sep 17 00:00:00 2001 From: Sunjeet Singh Date: Sun, 8 Oct 2023 19:00:14 -0700 Subject: [PATCH] Add tests for resharding with type filter --- .../HollowObjectTypeDataElementsJoiner.java | 5 +-- ...owObjectTypeDataElementsSplitJoinTest.java | 23 ++++++++++-- ...owObjectTypeDataElementsSplitJoinTest.java | 22 ++++++++++++ .../object/HollowObjectTypeReadStateTest.java | 35 +++++++++++++++++++ 4 files changed, 81 insertions(+), 4 deletions(-) diff --git a/hollow/src/main/java/com/netflix/hollow/core/read/engine/object/HollowObjectTypeDataElementsJoiner.java b/hollow/src/main/java/com/netflix/hollow/core/read/engine/object/HollowObjectTypeDataElementsJoiner.java index b91b317759..806c11ce53 100644 --- a/hollow/src/main/java/com/netflix/hollow/core/read/engine/object/HollowObjectTypeDataElementsJoiner.java +++ b/hollow/src/main/java/com/netflix/hollow/core/read/engine/object/HollowObjectTypeDataElementsJoiner.java @@ -88,7 +88,8 @@ void populateStats(HollowObjectTypeDataElements to, HollowObjectTypeDataElements to.bitsPerRecord += to.bitsPerField[fieldIdx]; } - to.bitsPerUnfilteredField = from[0].bitsPerUnfilteredField; - to.unfilteredFieldIsIncluded = from[0].unfilteredFieldIsIncluded; + // unused + // to.bitsPerUnfilteredField + // to.unfilteredFieldIsIncluded } } diff --git a/hollow/src/test/java/com/netflix/hollow/core/read/engine/object/AbstractHollowObjectTypeDataElementsSplitJoinTest.java b/hollow/src/test/java/com/netflix/hollow/core/read/engine/object/AbstractHollowObjectTypeDataElementsSplitJoinTest.java index d149acffab..adffb055f8 100644 --- a/hollow/src/test/java/com/netflix/hollow/core/read/engine/object/AbstractHollowObjectTypeDataElementsSplitJoinTest.java +++ b/hollow/src/test/java/com/netflix/hollow/core/read/engine/object/AbstractHollowObjectTypeDataElementsSplitJoinTest.java @@ -5,7 +5,10 @@ import com.netflix.hollow.api.objects.generic.GenericHollowObject; import com.netflix.hollow.core.AbstractStateEngineTest; +import com.netflix.hollow.core.read.engine.HollowReadStateEngine; +import com.netflix.hollow.core.read.filter.HollowFilterConfig; import com.netflix.hollow.core.schema.HollowObjectSchema; +import com.netflix.hollow.core.util.StateEngineRoundTripper; import com.netflix.hollow.core.write.HollowObjectTypeWriteState; import com.netflix.hollow.core.write.HollowObjectWriteRecord; import java.io.IOException; @@ -39,7 +42,7 @@ protected void initializeTypeStates() { writeStateEngine.addTypeState(new HollowObjectTypeWriteState(schema)); } - protected HollowObjectTypeReadState populateTypeStateWith(int numRecords) throws IOException { + private void populateWriteStateEngine(int numRecords) { initWriteStateEngine(); HollowObjectWriteRecord rec = new HollowObjectWriteRecord(schema); for(int i=0;i