Skip to content

Commit

Permalink
doc values assertions
Browse files Browse the repository at this point in the history
Signed-off-by: Sarthak Aggarwal <[email protected]>
  • Loading branch information
sarthakaggarwal97 committed Aug 15, 2024
1 parent e890b78 commit 08b2ffe
Show file tree
Hide file tree
Showing 3 changed files with 549 additions and 126 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ public CompositeIndexValues getCompositeIndexValues(CompositeIndexFieldInfo comp

switch (compositeIndexFieldInfo.getType()) {
case STAR_TREE:

return new StarTreeValues(
compositeIndexMetadataMap.get(compositeIndexFieldInfo.getField()),
compositeIndexInputMap.get(compositeIndexFieldInfo.getField()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ public static void assertStarTreeDocuments(StarTreeDocument[] starTreeDocuments,
}

for (int mi = 0; mi < resultStarTreeDocument.metrics.length; mi++) {
assertEquals(resultStarTreeDocument.metrics[mi], expectedStarTreeDocument.metrics[mi]);
if (expectedStarTreeDocument.metrics[mi] instanceof Long) {
assertEquals(resultStarTreeDocument.metrics[mi], ((Long) expectedStarTreeDocument.metrics[mi]).doubleValue());
} else {
assertEquals(resultStarTreeDocument.metrics[mi], expectedStarTreeDocument.metrics[mi]);
}
}
}
}
Expand Down
Loading

0 comments on commit 08b2ffe

Please sign in to comment.