Examples of VectorizedRowBatch


Examples of org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch

    return batch;
  }

  @Test
  public void testLongScalarModuloLongColNoNulls()  {
    VectorizedRowBatch batch = getBatchSingleLongVectorPositiveNonZero();
    LongScalarModuloLongColumn expr = new LongScalarModuloLongColumn(100, 0, 1);
    expr.evaluate(batch);

    // verify
    for (int i = 0; i < VectorizedRowBatch.DEFAULT_SIZE; i++) {
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch

    Assert.assertFalse(((LongColumnVector)batch.cols[1]).isRepeating);
  }

  @Test
  public void testLongScalarSubtractLongColNoNulls()  {
    VectorizedRowBatch batch = getVectorizedRowBatchSingleLongVector(
        VectorizedRowBatch.DEFAULT_SIZE);
    LongScalarSubtractLongColumn expr = new LongScalarSubtractLongColumn(100, 0, 1);
    expr.evaluate(batch);

    //verify
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch

    Assert.assertFalse(((LongColumnVector)batch.cols[1]).isRepeating);
  }

  @Test
  public void testLongScalarSubtractLongColWithNulls()  {
    VectorizedRowBatch batch = getVectorizedRowBatchSingleLongVector(
        VectorizedRowBatch.DEFAULT_SIZE);
    LongColumnVector lcv = (LongColumnVector) batch.cols[0];
    TestVectorizedRowBatch.addRandomNulls(lcv);
    LongScalarSubtractLongColumn expr = new LongScalarSubtractLongColumn(100, 0, 1);
    expr.evaluate(batch);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch

  }

  @Test
  public void testLongScalarSubtractLongColWithRepeating() {
    LongColumnVector in, out;
    VectorizedRowBatch batch;
    LongScalarSubtractLongColumn expr;

    // Case 1: is repeating, no nulls
    batch = getVectorizedRowBatchSingleLongVector(
        VectorizedRowBatch.DEFAULT_SIZE);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch

    return Math.abs(a - b) < EPS;
  }

  @Test
  public void testLongScalarDivide() {
    VectorizedRowBatch batch =
        TestVectorArithmeticExpressions.getVectorizedRowBatch2LongInDoubleOut();
    LongColDivideLongScalar expr = new LongColDivideLongScalar(0, 100, 2);
    batch.cols[0].isNull[0] = true;
    batch.cols[0].noNulls = false;
    DoubleColumnVector out = (DoubleColumnVector) batch.cols[2];
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch

    assertFalse(out.isRepeating);
  }

  @Test
  public void testScalarLongDivide() {
    VectorizedRowBatch batch =
        TestVectorArithmeticExpressions.getVectorizedRowBatch2LongInDoubleOut();
    LongScalarDivideLongColumn expr = new LongScalarDivideLongColumn(100, 0, 2);
    batch.cols[0].isNull[1] = true;
    batch.cols[0].noNulls = false;
    DoubleColumnVector out = (DoubleColumnVector) batch.cols[2];
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch

    assertFalse(out.isRepeating);
  }

  @Test
  public void testBooleanValuedLongIn() {
    VectorizedRowBatch batch = getBatch();
    long[] a = new long[2];
    a[0] = 20;
    a[1] = 1000;
    batch.size = 2;
    VectorExpression expr = (new LongColumnInList(0, 1));
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch

    Assert.assertEquals(0, out.vector[0]);
    Assert.assertEquals(1, out.vector[1]);
  }

  private VectorizedRowBatch getBatch() {
    VectorizedRowBatch b = new VectorizedRowBatch(2);
    LongColumnVector v = new LongColumnVector();
    v.vector[0] = 10;
    v.vector[1] = 20;
    b.cols[0] = v;
    b.cols[1] = new LongColumnVector();
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch

  @Test
  public void testColConcatScalar() {

    // has nulls, not repeating
    VectorizedRowBatch batch = makeStringBatch();
    StringConcatColScalar expr = new StringConcatColScalar(0, red, 1);
    expr.evaluate(batch);
    BytesColumnVector outCol = (BytesColumnVector) batch.cols[1];

    int cmp = StringExpr.compare(redred, 0, redred.length, outCol.vector[0],
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch

  @Test
  public void testScalarConcatCol() {

    // has nulls, not repeating
    VectorizedRowBatch batch = makeStringBatch();
    StringConcatScalarCol expr = new StringConcatScalarCol(red, 0, 1);
    expr.evaluate(batch);
    BytesColumnVector outCol = (BytesColumnVector) batch.cols[1];

    int cmp = StringExpr.compare(redred, 0, redred.length, outCol.vector[0],
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.