Search in sources :

Example 1 with UDFHour

use of org.apache.hadoop.hive.ql.udf.UDFHour in project hive by apache.

the class TestVectorTimestampExpressions method compareToUDFHourLong.

private void compareToUDFHourLong(Timestamp t, int y) {
    UDFHour udf = new UDFHour();
    TimestampWritable tsw = new TimestampWritable(t);
    IntWritable res = udf.evaluate(tsw);
    Assert.assertEquals(res.get(), y);
}
Also used : UDFHour(org.apache.hadoop.hive.ql.udf.UDFHour) TimestampWritable(org.apache.hadoop.hive.serde2.io.TimestampWritable) IntWritable(org.apache.hadoop.io.IntWritable)

Aggregations

UDFHour (org.apache.hadoop.hive.ql.udf.UDFHour)1 TimestampWritable (org.apache.hadoop.hive.serde2.io.TimestampWritable)1 IntWritable (org.apache.hadoop.io.IntWritable)1