Assert.assertEquals(Collections.singletonList(3L), rowList.get(2).metricValues()); checkBitmapIndex(Collections.emptyList(), adapter.getBitmapIndex("d3", null)); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("d3", "30000")); checkBitmapIndex(Collections.singletonList(1), adapter.getBitmapIndex("d3", "40000")); checkBitmapIndex(Collections.singletonList(2), adapter.getBitmapIndex("d3", "50000")); checkBitmapIndex(Collections.emptyList(), adapter.getBitmapIndex("d1", null)); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("d1", "100")); checkBitmapIndex(Collections.singletonList(2), adapter.getBitmapIndex("d1", "200")); checkBitmapIndex(Collections.singletonList(1), adapter.getBitmapIndex("d1", "300")); checkBitmapIndex(Collections.emptyList(), adapter.getBitmapIndex("d2", null)); checkBitmapIndex(Collections.singletonList(1), adapter.getBitmapIndex("d2", "2000")); checkBitmapIndex(Collections.singletonList(2), adapter.getBitmapIndex("d2", "3000")); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("d2", "4000"));
Assert.assertEquals(Arrays.asList("3", null), rowList.get(1).dimensionValues()); checkBitmapIndex(Collections.emptyList(), adapter.getBitmapIndex("dim1", null)); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("dim1", "1")); checkBitmapIndex(Collections.singletonList(1), adapter.getBitmapIndex("dim1", "3")); checkBitmapIndex(Collections.singletonList(1), adapter.getBitmapIndex("dim2", null)); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("dim2", "2"));
checkBitmapIndex(Arrays.asList(0, 2, 3), adapter.getBitmapIndex("d2", null)); checkBitmapIndex(Arrays.asList(0, 1, 3), adapter.getBitmapIndex("d5", null)); checkBitmapIndex(Arrays.asList(0, 3), adapter.getBitmapIndex("d7", null)); } else { Assert.assertEquals( rowList.get(3).dimensionValues() ); checkBitmapIndex(Arrays.asList(2, 3), adapter.getBitmapIndex("d2", null)); checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("d5", null)); checkBitmapIndex(Collections.emptyList(), adapter.getBitmapIndex("d7", null)); checkBitmapIndex(Collections.singletonList(1), adapter.getBitmapIndex("d2", "210")); checkBitmapIndex(Arrays.asList(2, 3), adapter.getBitmapIndex("d3", null)); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("d3", "310")); checkBitmapIndex(Collections.singletonList(1), adapter.getBitmapIndex("d3", "311")); checkBitmapIndex(Collections.singletonList(2), adapter.getBitmapIndex("d5", "520")); checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("d6", null)); checkBitmapIndex(Collections.singletonList(2), adapter.getBitmapIndex("d6", "620")); checkBitmapIndex(Collections.singletonList(3), adapter.getBitmapIndex("d6", "621")); checkBitmapIndex(Collections.singletonList(1), adapter.getBitmapIndex("d7", "710")); checkBitmapIndex(Collections.singletonList(2), adapter.getBitmapIndex("d7", "720")); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("d8", null)); checkBitmapIndex(Collections.singletonList(1), adapter.getBitmapIndex("d8", "810"));
checkBitmapIndex(Collections.emptyList(), adapter.getBitmapIndex("dim1", null)); checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("dim1", "a")); checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("dim1", "b")); checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("dim1", "x")); checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("dim2", "a")); checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("dim2", "b")); checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("dim2", "x")); checkBitmapIndex(Collections.emptyList(), adapter.getBitmapIndex("dim1", null)); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("dim1", "a")); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("dim1", "b")); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("dim1", "x")); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("dim2", "a")); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("dim2", "b")); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("dim2", "x")); checkBitmapIndex(Collections.emptyList(), adapter.getBitmapIndex("dim1", null)); checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("dim1", "a")); checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("dim1", "b")); checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("dim1", "x")); checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("dim2", "a")); checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("dim2", "b")); checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("dim2", "x"));
checkBitmapIndex(Arrays.asList(0, 1, 2), adapter.getBitmapIndex("dimA", null)); checkBitmapIndex(Collections.singletonList(3), adapter.getBitmapIndex("dimA", "1")); checkBitmapIndex(Collections.singletonList(4), adapter.getBitmapIndex("dimA", "2")); checkBitmapIndex(Arrays.asList(3, 4), adapter.getBitmapIndex("dimB", null)); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("dimB", "1")); checkBitmapIndex(Collections.singletonList(1), adapter.getBitmapIndex("dimB", "2")); checkBitmapIndex(Collections.singletonList(2), adapter.getBitmapIndex("dimB", "3"));
Assert.assertEquals(Collections.singletonList(2L), rowList.get(4).metricValues()); checkBitmapIndex(Arrays.asList(2, 3, 4), adapter.getBitmapIndex("dimA", null)); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("dimA", "1")); checkBitmapIndex(Collections.singletonList(1), adapter.getBitmapIndex("dimA", "2")); checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("dimB", null)); checkBitmapIndex(Collections.singletonList(2), adapter.getBitmapIndex("dimB", "1")); checkBitmapIndex(Collections.singletonList(3), adapter.getBitmapIndex("dimB", "2")); checkBitmapIndex(Collections.singletonList(4), adapter.getBitmapIndex("dimB", "3")); Assert.assertEquals(Collections.singletonList(2L), rowList2.get(11).metricValues()); checkBitmapIndex(Arrays.asList(0, 1, 2, 3, 4, 5, 8, 9, 10), adapter2.getBitmapIndex("dimA", null)); checkBitmapIndex(Collections.singletonList(6), adapter2.getBitmapIndex("dimA", "1")); checkBitmapIndex(Arrays.asList(7, 11), adapter2.getBitmapIndex("dimA", "2")); checkBitmapIndex(Arrays.asList(0, 1, 2, 6, 7, 11), adapter2.getBitmapIndex("dimB", null)); checkBitmapIndex(Arrays.asList(3, 8), adapter2.getBitmapIndex("dimB", "1")); checkBitmapIndex(Arrays.asList(4, 9), adapter2.getBitmapIndex("dimB", "2")); checkBitmapIndex(Arrays.asList(5, 10), adapter2.getBitmapIndex("dimB", "3")); checkBitmapIndex(Arrays.asList(3, 4, 5, 6, 7, 8, 9, 10, 11), adapter2.getBitmapIndex("dimC", null)); checkBitmapIndex(Collections.singletonList(0), adapter2.getBitmapIndex("dimC", "1")); checkBitmapIndex(Collections.singletonList(1), adapter2.getBitmapIndex("dimC", "2")); checkBitmapIndex(Collections.singletonList(2), adapter2.getBitmapIndex("dimC", "3"));
checkBitmapIndex(Collections.singletonList(3), adapter.getBitmapIndex("d3", null)); checkBitmapIndex(Arrays.asList(0, 1, 2), adapter.getBitmapIndex("d3", "310")); checkBitmapIndex(Arrays.asList(0, 1, 2), adapter.getBitmapIndex("d6", null)); checkBitmapIndex(Collections.singletonList(3), adapter.getBitmapIndex("d6", "621")); checkBitmapIndex(Arrays.asList(0, 1, 2), adapter.getBitmapIndex("d8", null)); checkBitmapIndex(Collections.singletonList(3), adapter.getBitmapIndex("d8", "821")); checkBitmapIndex(Collections.emptyList(), adapter.getBitmapIndex("d9", null)); checkBitmapIndex(Arrays.asList(0, 1, 2), adapter.getBitmapIndex("d9", "910")); checkBitmapIndex(Collections.singletonList(3), adapter.getBitmapIndex("d9", "921"));
checkBitmapIndex(Arrays.asList(0, 1), adapter.getBitmapIndex("dimA", null)); checkBitmapIndex(Collections.singletonList(2), adapter.getBitmapIndex("dimA", "1")); checkBitmapIndex(Collections.singletonList(3), adapter.getBitmapIndex("dimA", "2")); checkBitmapIndex(Collections.emptyList(), adapter.getBitmapIndex("dimB", null)); checkBitmapIndex(Arrays.asList(2, 3), adapter.getBitmapIndex("dimC", null)); checkBitmapIndex(Collections.singletonList(0), adapter.getBitmapIndex("dimC", "1")); checkBitmapIndex(Collections.singletonList(1), adapter.getBitmapIndex("dimC", "2")); checkBitmapIndex(Collections.emptyList(), adapter.getBitmapIndex("dimB", ""));