use of org.apache.flink.table.planner.plan.utils.RankProcessStrategy in project flink by apache.
the class RankProcessStrategySerdeTest method testRankRange.
@Test
public void testRankRange() throws JsonProcessingException {
ObjectMapper mapper = new ObjectMapper();
RankProcessStrategy[] strategies = new RankProcessStrategy[] { RankProcessStrategy.UNDEFINED_STRATEGY, RankProcessStrategy.APPEND_FAST_STRATEGY, RankProcessStrategy.RETRACT_STRATEGY, new RankProcessStrategy.UpdateFastStrategy(new int[] { 1, 2 }) };
for (RankProcessStrategy strategy : strategies) {
RankProcessStrategy result = mapper.readValue(mapper.writeValueAsString(strategy), RankProcessStrategy.class);
assertEquals(strategy.toString(), result.toString());
}
}
Aggregations