use of org.apache.drill.exec.vector.complex.reader.FieldReader in project drill by axbaretto.
the class RepeatedMapReaderImpl method reader.
@Override
public FieldReader reader(String name) {
FieldReader reader = fields.get(name);
if (reader == null) {
ValueVector child = vector.getChild(name);
if (child == null) {
reader = NullReader.INSTANCE;
} else {
reader = child.getReader();
}
fields.put(name, reader);
reader.setPosition(currentOffset);
}
return reader;
}
use of org.apache.drill.exec.vector.complex.reader.FieldReader in project drill by apache.
the class ListVector method copyFrom.
public void copyFrom(int inIndex, int outIndex, ListVector from) {
final FieldReader in = from.getReader();
in.setPosition(inIndex);
final FieldWriter out = getWriter();
out.setPosition(outIndex);
ComplexCopier.copy(in, out);
}
use of org.apache.drill.exec.vector.complex.reader.FieldReader in project drill by apache.
the class AbstractRepeatedMapReaderImpl method reset.
@Override
public void reset() {
super.reset();
currentOffset = 0;
maxOffset = 0;
for (FieldReader reader : fields.values()) {
reader.reset();
}
fields.clear();
}
use of org.apache.drill.exec.vector.complex.reader.FieldReader in project drill by apache.
the class SingleDictReaderImpl method read.
@Override
public void read(Object key, ValueHolder holder) {
if (isEmpty()) {
return;
}
int index = find(key);
FieldReader valueReader = reader(DictVector.FIELD_VALUE_NAME);
valueReader.setPosition(index);
if (index != NOT_FOUND) {
valueReader.read(holder);
}
}
use of org.apache.drill.exec.vector.complex.reader.FieldReader in project drill by apache.
the class SingleMapReaderImpl method reader.
@Override
public FieldReader reader(String name) {
FieldReader reader = fields.get(name);
if (reader == null) {
ValueVector child = vector.getChild(name);
if (child == null) {
reader = NullReader.INSTANCE;
} else {
reader = child.getReader();
}
fields.put(name, reader);
reader.setPosition(idx());
}
return reader;
}
Aggregations