Search in sources :

Example 1 with UDFSecond

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

the class TestVectorTimestampExpressions method compareToUDFSecondLong.

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

Aggregations

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