PlannerUtils { public static Row copyTime(Row fromRow, TimeModel fromTimeModel, Row into, TimeModel intoTimeModel) { assertCompatibleTimeModels(fromTimeModel, intoTimeModel); Row fromTime = fromTimeModel.getTime(fromRow); for (int fieldNum = 0; fieldNum < fromTimeModel.getSchema().size(); fieldNum++) { into = RowUtils.set(into, intoTimeModel.getSchema().fieldNames()[fieldNum], fromTime.get(fieldNum)); } return into; }  static Row setMutationType(Row row, MutationType mutationType); static MutationType getMutationType(Row row); static Row appendMutationTypeField(Row row); static Row removeMutationTypeField(Row row); static boolean hasMutationTypeField(Row row); static Row copyTime(Row fromRow, TimeModel fromTimeModel, Row into, TimeModel intoTimeModel); static Row copyPrecedingTime(Row fromRow, TimeModel fromTimeModel, Row into, TimeModel intoTimeModel); static boolean before(TimeModel timeModel, Row first, Row second); static boolean simultaneous(TimeModel timeModel, Row first, Row second); static boolean after(TimeModel timeModel, Row first, Row second); static Row appendSurrogateKey(Row row, String fieldName);  }
@Test public void testCopyTime() { Row row = new RowWithSchema(schemaWithTMs, 1000L, null); Row copied = PlannerUtils.copyTime(row, firstTM, row, secondTM); assertEquals(copied.<Long>getAs("second"), (Long)1000L); }