Examples of FakeVectorRowBatchFromObjectIterables


Examples of org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables

  }

  private void validateVectorLimitOperator(int limit, int batchSize, int expectedBatchSize)
      throws HiveException {

    @SuppressWarnings("unchecked")
    FakeVectorRowBatchFromObjectIterables frboi = new FakeVectorRowBatchFromObjectIterables(
        batchSize,
        new String[] {"tinyint", "double"},
        Arrays.asList(new Object[] {1, 2, 3, 4}),
        Arrays.asList(new Object[] {323.0, 34.5, null, 89.3}));

    // Get next batch
    VectorizedRowBatch vrb = frboi.produceNextBatch();

    // Create limit desc with limit value
    LimitDesc ld = new LimitDesc(limit);
    VectorLimitOperator lo = new VectorLimitOperator(null, ld);
    lo.initialize(new Configuration(), null);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables

          }
        };
      }
    };

    FakeVectorRowBatchFromObjectIterables data = new FakeVectorRowBatchFromObjectIterables(
        100,
        new String[] {"long", "long"},
        it,
        it);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables

  @Test
  public void testMultiKeyIntStringInt() throws HiveException {
    testMultiKey(
        "sum",
        new FakeVectorRowBatchFromObjectIterables(
            2,
            new String[] {"int", "string", "int", "double"},
            Arrays.asList(new Object[]{null,   1,   1,  null,    2,    2, null}),
            Arrays.asList(new Object[]{ "A", "A""A", "C", null, null,  "A"}),
            Arrays.asList(new Object[]{null,   2,   2,  null,    2,    2, null}),
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables

  @Test
  public void testMultiKeyStringByteString() throws HiveException {
    testMultiKey(
        "sum",
        new FakeVectorRowBatchFromObjectIterables(
            1,
            new String[] {"string", "tinyint", "string", "double"},
            Arrays.asList(new Object[]{"A", "A", null}),
            Arrays.asList(new Object[]{  11,     1}),
            Arrays.asList(new Object[]{ "A", "A", "A"}),
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables

  @Test
  public void testMultiKeyStringIntString() throws HiveException {
    testMultiKey(
        "sum",
        new FakeVectorRowBatchFromObjectIterables(
            2,
            new String[] {"string", "int", "string", "double"},
            Arrays.asList(new Object[]{ "A", "A", "A", "C", null, null,  "A"}),
            Arrays.asList(new Object[]{null,   11, null,    2,    2, null}),
            Arrays.asList(new Object[]{ "A", "A", "A", "C", null, null,  "A"}),
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables

  @Test
  public void testMultiKeyIntStringString() throws HiveException {
    testMultiKey(
        "sum",
        new FakeVectorRowBatchFromObjectIterables(
            2,
            new String[] {"int", "string", "string", "double"},
            Arrays.asList(new Object[]{null,   11, null,    2,    2, null}),
            Arrays.asList(new Object[]{ "A", "A", "A", "C", null, null,  "A"}),
            Arrays.asList(new Object[]{ "A", "A", "A", "C", null, null,  "A"}),
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables

  @Test
  public void testMultiKeyDoubleStringInt() throws HiveException {
    testMultiKey(
        "sum",
        new FakeVectorRowBatchFromObjectIterables(
            2,
            new String[] {"double", "string", "int", "double"},
            Arrays.asList(new Object[]{null,  1.0, 1.0,  null,  2.02.0, null}),
            Arrays.asList(new Object[]{ "A", "A""A", "C",   null, null,  "A"}),
            Arrays.asList(new Object[]{null,   2,   2,  null,     2,    2, null}),
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables

  @Test
  public void testMultiKeyDoubleShortString() throws HiveException {
    short s = 2;
    testMultiKey(
        "sum",
        new FakeVectorRowBatchFromObjectIterables(
            2,
            new String[] {"double", "smallint", "string", "double"},
            Arrays.asList(new Object[]{null,  1.0, 1.0,  null,  2.02.0, null}),
            Arrays.asList(new Object[]{null,  s,     s,  null,    s,    s, null}),
            Arrays.asList(new Object[]{ "A", "A""A",   "C", null, null,  "A"}),
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables

  @Test
  public void testDoubleValueTypeSum() throws HiveException {
    testKeyTypeAggregate(
        "sum",
        new FakeVectorRowBatchFromObjectIterables(
            2,
            new String[] {"tinyint", "double"},
            Arrays.asList(new Object[]{  1,null, 1, null}),
            Arrays.asList(new Object[]{13.0,null,7.0, 19.0})),
        buildHashMap((byte)1, 20.0, null, 19.0));
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables

  @Test
  public void testDoubleValueTypeSumOneKey() throws HiveException {
    testKeyTypeAggregate(
        "sum",
        new FakeVectorRowBatchFromObjectIterables(
            2,
            new String[] {"tinyint", "double"},
            Arrays.asList(new Object[]{  1, 1, 1, 1}),
            Arrays.asList(new Object[]{13.0,null,7.0, 19.0})),
        buildHashMap((byte)1, 39.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.