90919293949596979899
batch.size = size; return batch; } private void compareToUDFYearDate(long t, int y) { UDFYear udf = new UDFYear(); TimestampWritable tsw = toTimestampWritable(t); IntWritable res = udf.evaluate(tsw); Assert.assertEquals(res.get(), y); }
225226227228229230231232233234
private enum TestType { LONG2, STRING_LONG } private void compareToUDFYearLong(long t, int y) { UDFYear udf = new UDFYear(); TimestampWritable tsw = toTimestampWritable(t); IntWritable res = udf.evaluate(tsw); Assert.assertEquals(res.get(), y); }