/** * Returns a {@link org.apache.arrow.vector.ValueVector} corresponding to the given ordinal identifier. * * @param id the ordinal of the child to return * @return the corresponding child */ public ValueVector getChildByOrdinal(int id) { return vectors.getByOrdinal(id); }
/** * Get child vectors. * @return a sequence of underlying child vectors. */ protected List<FieldVector> getChildren() { int size = vectors.size(); List<FieldVector> children = new ArrayList<>(); for (int i = 0; i < size; i++) { children.add(vectors.getByOrdinal(i)); } return children; }
/** * Get a child vector by name. * @param name the name of the child to return * @return a vector with its corresponding ordinal mapping if field exists or null. */ @Override public VectorWithOrdinal getChildVectorWithOrdinal(String name) { final int ordinal = vectors.getOrdinal(name); if (ordinal < 0) { return null; } final ValueVector vector = vectors.getByOrdinal(ordinal); return new VectorWithOrdinal(vector, ordinal); }