use of org.apache.hive.service.rpc.thrift.TColumnValue in project hive by apache.
the class RowBasedSet method iterator.
@Override
public Iterator<Object[]> iterator() {
return new Iterator<Object[]>() {
final Iterator<TRow> iterator = rows.iterator();
final Object[] convey = new Object[numColumns()];
@Override
public boolean hasNext() {
return iterator.hasNext();
}
@Override
public Object[] next() {
TRow row = iterator.next();
List<TColumnValue> values = row.getColVals();
for (int i = 0; i < values.size(); i++) {
convey[i] = ColumnValue.toColumnValue(values.get(i));
}
return convey;
}
@Override
public void remove() {
throw new UnsupportedOperationException("remove");
}
};
}
Aggregations