@Override
  public int findScalarInMap(MapColumnVector mapColumnVector, int mapBatchIndex) {
    final int offset = (int) mapColumnVector.offsets[mapBatchIndex];
    final int count = (int) mapColumnVector.lengths[mapBatchIndex];

    ColumnVector keys =  mapColumnVector.keys;
    if (keys instanceof DecimalColumnVector) {
      HiveDecimalWritable[] decimalKeyVector = ((DecimalColumnVector) keys).vector;
      for (int i = 0; i < count; i++) {
        if (decimalKeyVector[offset + i].compareTo(key) == 0) {
          return offset + i;
        }
      }
    } else {

      // For some strange reason we receive a double column vector...
      // The way we do VectorExpressionDescriptor may be inadequate in this case...
      double[] doubleKeyVector = ((DoubleColumnVector) keys).vector;
      for (int i = 0; i < count; i++) {
        if (doubleKeyVector[offset + i] == doubleKey) {
          return offset + i;
        }
      }
    }
    return -1;
  }
Returns value of Map.
Extends {@link VectorUDFMapIndexBaseScalar}
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFMapIndexDecimalScalar.java