Search in sources :

Example 1 with FuncACosDoubleToDouble

use of org.apache.hadoop.hive.ql.exec.vector.expressions.gen.FuncACosDoubleToDouble in project hive by apache.

the class TestVectorMathFunctions method testVectorACos.

@Test
public void testVectorACos() {
    VectorizedRowBatch b = getVectorizedRowBatchDoubleInDoubleOut();
    DoubleColumnVector resultV = (DoubleColumnVector) b.cols[1];
    b.cols[0].noNulls = true;
    VectorExpression expr = new FuncACosDoubleToDouble(0, 1);
    expr.evaluate(b);
    Assert.assertEquals(Math.acos(0.5d), resultV.vector[4]);
}
Also used : VectorizedRowBatch(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch) DoubleColumnVector(org.apache.hadoop.hive.ql.exec.vector.DoubleColumnVector) FuncACosDoubleToDouble(org.apache.hadoop.hive.ql.exec.vector.expressions.gen.FuncACosDoubleToDouble) Test(org.junit.Test)

Aggregations

DoubleColumnVector (org.apache.hadoop.hive.ql.exec.vector.DoubleColumnVector)1 VectorizedRowBatch (org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch)1 FuncACosDoubleToDouble (org.apache.hadoop.hive.ql.exec.vector.expressions.gen.FuncACosDoubleToDouble)1 Test (org.junit.Test)1