use of com.yahoo.elide.datastores.aggregation.query.TimeDimensionProjection in project elide by yahoo.
the class EntityProjectionTranslatorTest method testTimeDimension.
@Test
public void testTimeDimension() {
EntityProjection projection = basicProjection.copyOf().attribute(Attribute.builder().type(Date.class).name("recordedDate").build()).build();
EntityProjectionTranslator translator = new EntityProjectionTranslator(engine, playerStatsTable, projection, scope, true);
Query query = translator.getQuery();
List<TimeDimensionProjection> timeDimensions = new ArrayList<>(query.getTimeDimensionProjections());
assertEquals(1, timeDimensions.size());
assertEquals("recordedDate", timeDimensions.get(0).getAlias());
assertEquals(TimeGrain.DAY, timeDimensions.get(0).getGrain());
}
Aggregations