private boolean vectorEqual(BytesColumnVector vector, int i, byte[] bytes, int offset, int length) {
    byte[] bytesSlice = new byte[length];
    System.arraycopy(bytes, offset, bytesSlice, 0, length);
    int vectorLength = vector.length[i];
    byte[] vectorSlice = new byte[vectorLength];
    System.arraycopy(vector.vector[i], vector.start[i], vectorSlice, 0, vectorLength);
    boolean equals = Arrays.equals(bytesSlice, vectorSlice);
    if (!equals) {
      System.out.println("vectorEqual offset " + offset + " length " + length + " vectorSlice.length " + vectorSlice.length);
      System.out.println("vectorEqual bytesSlice " + Hex.encodeHexString(bytesSlice));
      System.out.println("vectorEqual vectorSlice " + Hex.encodeHexString(vectorSlice));
    }
    return equals;
  }
Test vectorized expression and filter evaluation for strings.
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorStringExpressions.java