ThirdEyeQuery { public List<String[]> getDimensionCombinations(List<DimensionSpec> dimensions) { List<String[]> collector = new LinkedList<String[]>(); String[] current = new String[dimensions.size()]; for (int i = 0; i < dimensions.size(); i++) { if (dimensionValues.containsKey(dimensions.get(i).getName())) { current[i] = null; } else { current[i] = StarTreeConstants.STAR; } } getDimensionCombinations(dimensions, current, collector, 0); return collector; } ThirdEyeQuery(); @Override String toString(); ThirdEyeQuery setCollection(String collection); ThirdEyeQuery addMetricName(String metricName); ThirdEyeQuery addDimensionValue(String dimensionName, String dimensionValue); ThirdEyeQuery addGroupByColumn(String column); ThirdEyeQuery setStart(DateTime start); ThirdEyeQuery setEnd(DateTime end); ThirdEyeQuery addFunction(ThirdEyeFunction function); ThirdEyeQuery addDerivedMetric(ThirdEyeFunction function); String getCollection(); List<String> getMetricNames(); DateTime getStart(); DateTime getEnd(); List<String> getGroupByColumns(); Multimap<String, String> getDimensionValues(); List<ThirdEyeFunction> getFunctions(); List<ThirdEyeFunction> getDerivedMetrics(); List<String[]> getDimensionCombinations(List<DimensionSpec> dimensions);  }
@Test public void testGetDimensionCombinations_allStar() { List<String[]> combinations = query.getDimensionCombinations(dimensions); Assert.assertEquals(combinations.size(), 1); Assert.assertEquals(combinations.get(0), new String[] { "*", "*", "*" }); }