Package org.apache.hadoop.hive.ql.exec.vector.expressions.gen

Examples of org.apache.hadoop.hive.ql.exec.vector.expressions.gen.FuncLog2DoubleToDouble


    // test double->double version
    VectorizedRowBatch b = getVectorizedRowBatchDoubleInDoubleOut();
    DoubleColumnVector resultV = (DoubleColumnVector) b.cols[1];
    b.cols[0].noNulls = true;
    VectorExpression expr = new FuncLog2DoubleToDouble(0, 1);
    expr.evaluate(b);
    Assert.assertEquals(Math.log(0.5d) / Math.log(2), resultV.vector[4]);

    // test long->double version
    b = getVectorizedRowBatchLongInDoubleOut();
    resultV = (DoubleColumnVector) b.cols[1];
    b.cols[0].noNulls = true;
    expr = new FuncLog2LongToDouble(0, 1);
    expr.evaluate(b);
    Assert.assertEquals(Math.log(1) / Math.log(2), resultV.vector[3]);
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.ql.exec.vector.expressions.gen.FuncLog2DoubleToDouble

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.