@Override
  public Object evaluate(DeferredObject[] arguments) throws HiveException {
    List<?> value_array = arrayOI.getList(arguments[0].get());
    List<?> index_array = (List<?>)converter.convert(arguments[1].get());

    if (value_array == null || index_array == null) {
      return null;
    }

    // Avoid using addAll or the constructor here because that will cause
    // an unchecked cast warning on List<?>.
    HashSet<Integer> indices = new HashSet<Integer>();
    for (int ii = 0; ii < index_array.size(); ++ii) {
      indices.add((Integer)index_array.get(ii));
    }

    ArrayList<Object> result = new ArrayList<Object>();
    for (int ii = 0; ii < value_array.size(); ++ii) {
      if (!indices.contains(ii)) {
        result.add(value_array.get(ii));
      }
    }
  
    return result;
  }