@Test
  public void testInstantiateExpressionNonPrimitiveConstantType_KO() throws Exception {
    VectorGroupByOperator op = new VectorGroupByOperator();
    // VectorUDAFBloomFilterMerge with specific constructor (additional constant parameter)
    VectorAggregationDesc desc = Mockito.mock(VectorAggregationDesc.class);
    Mockito.when(desc.getVecAggrClass()).thenReturn((Class) VectorUDAFBloomFilterMerge.class);
    Mockito.when(desc.getEvaluator())
        .thenReturn(new GenericUDAFBloomFilter.GenericUDAFBloomFilterEvaluator());
    TypeInfo intTypeInfo = TypeInfoFactory.getPrimitiveTypeInfoFromJavaPrimitive(Integer.TYPE);
    TypeInfo structTypeInfo = TypeInfoFactory.getStructTypeInfo(
        Collections.singletonList("first"), Collections.singletonList(intTypeInfo));
    Mockito.when(desc.getConstants()).thenReturn(
        Collections.singletonList(ConstantVectorExpression.create(2, Arrays.asList(16), structTypeInfo)));
    assertThrows(IllegalArgumentException.class, () -> op.instantiateExpression(desc));
  }
Unit test for the vectorized GROUP BY operator.
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorGroupByOperator.java