Search in sources :

Example 6 with FakeVectorRowBatchFromObjectIterables

use of org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables in project hive by apache.

the class TestVectorGroupByOperator method testAggregateDouble.

public void testAggregateDouble(String aggregateName, int batchSize, Iterable<Object> values, Object expected) throws HiveException {
    @SuppressWarnings("unchecked") FakeVectorRowBatchFromObjectIterables fdr = new FakeVectorRowBatchFromObjectIterables(batchSize, new String[] { "double" }, values);
    testAggregateDoubleIterable(aggregateName, fdr, expected);
}
Also used : FakeVectorRowBatchFromObjectIterables(org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables)

Example 7 with FakeVectorRowBatchFromObjectIterables

use of org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables in project hive by apache.

the class TestVectorGroupByOperator method testAggregateDoubleStringKeyAggregate.

public void testAggregateDoubleStringKeyAggregate(String aggregateName, int batchSize, Iterable<Object> list, Iterable<Object> values, HashMap<Object, Object> expected) throws HiveException {
    @SuppressWarnings("unchecked") FakeVectorRowBatchFromObjectIterables fdr = new FakeVectorRowBatchFromObjectIterables(batchSize, new String[] { "string", "double" }, list, values);
    testAggregateStringKeyIterable(aggregateName, fdr, TypeInfoFactory.doubleTypeInfo, expected);
}
Also used : FakeVectorRowBatchFromObjectIterables(org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables)

Example 8 with FakeVectorRowBatchFromObjectIterables

use of org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables in project hive by apache.

the class TestVectorGroupByOperator method testAggregateStringKeyAggregate.

public void testAggregateStringKeyAggregate(String aggregateName, int batchSize, Iterable<Object> list, Iterable<Object> values, HashMap<Object, Object> expected) throws HiveException {
    @SuppressWarnings("unchecked") FakeVectorRowBatchFromObjectIterables fdr = new FakeVectorRowBatchFromObjectIterables(batchSize, new String[] { "string", "long" }, list, values);
    testAggregateStringKeyIterable(aggregateName, fdr, TypeInfoFactory.longTypeInfo, expected);
}
Also used : FakeVectorRowBatchFromObjectIterables(org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables)

Aggregations

FakeVectorRowBatchFromObjectIterables (org.apache.hadoop.hive.ql.exec.vector.util.FakeVectorRowBatchFromObjectIterables)8 CompilationOpContext (org.apache.hadoop.hive.ql.CompilationOpContext)2 Test (org.junit.Test)2 MemoryMXBean (java.lang.management.MemoryMXBean)1 ArrayList (java.util.ArrayList)1 Iterator (java.util.Iterator)1 Configuration (org.apache.hadoop.conf.Configuration)1 FakeCaptureOutputOperator (org.apache.hadoop.hive.ql.exec.vector.util.FakeCaptureOutputOperator)1 HiveException (org.apache.hadoop.hive.ql.metadata.HiveException)1 GroupByDesc (org.apache.hadoop.hive.ql.plan.GroupByDesc)1 LimitDesc (org.apache.hadoop.hive.ql.plan.LimitDesc)1 VectorGroupByDesc (org.apache.hadoop.hive.ql.plan.VectorGroupByDesc)1