use of io.hops.hopsworks.common.featurestore.query.QueryDTO in project hopsworks by logicalclocks.
the class TestPitJoinController method testIsPitEnabledTrueQueryDTO.
@Test
public void testIsPitEnabledTrueQueryDTO() {
FeaturegroupDTO fg1 = new FeaturegroupDTO("ts");
FeaturegroupDTO fg2 = new FeaturegroupDTO("ts");
JoinDTO join1 = new JoinDTO(new QueryDTO(fg1, null), null, null);
JoinDTO join2 = new JoinDTO(new QueryDTO(fg2, null), null, null);
List<JoinDTO> joins = Arrays.asList(join1, join2);
QueryDTO leftQuery = new QueryDTO(new FeaturegroupDTO("ts"), new ArrayList<>(), joins);
Assert.assertEquals(true, pitJoinController.isPitEnabled(leftQuery));
}
use of io.hops.hopsworks.common.featurestore.query.QueryDTO in project hopsworks by logicalclocks.
the class TestPitJoinController method testIsPitEnabledFalseQueryDTO.
@Test
public void testIsPitEnabledFalseQueryDTO() {
FeaturegroupDTO fg1 = new FeaturegroupDTO("ts");
// not event time enabled fg, therefore should be pitEnabled should be false
FeaturegroupDTO fg2 = new FeaturegroupDTO();
JoinDTO join1 = new JoinDTO(new QueryDTO(fg1, null), null, null);
JoinDTO join2 = new JoinDTO(new QueryDTO(fg2, null), null, null);
List<JoinDTO> joins = Arrays.asList(join1, join2);
QueryDTO leftQuery = new QueryDTO(new FeaturegroupDTO("ts"), new ArrayList<>(), joins);
Assert.assertEquals(false, pitJoinController.isPitEnabled(leftQuery));
}
Aggregations