Interface RequestedTuple

All Known Implementing Classes:
ImpliedTupleRequest, RequestedTupleImpl

public interface RequestedTuple
Represents the set of columns projected for a tuple (row or map.) Each column may have structure: a set of referenced names or array indices.

Three variations exist:

  • Project all (ImpliedTupleRequest.ALL_MEMBERS): used for a tuple when all columns are projected. Example: the root tuple (the row) in a SELECT * query.
  • Project none (also ImpliedTupleRequest.NO_MEMBERS): used when no columns are projected from a tuple, such as when a map itself is not projected, so none of its member columns are projected.
  • Project some (RequestedTupleImpl: used in the SELECT a, c, e case in which the query identifies which columns to project (implicitly leaving out others, such as b and d in our example.)

The result is that each tuple (row and map) has an associated projection set which the code can query to determine if a newly added column is wanted (and so should have a backing vector) or is unwanted (and can just receive a dummy writer.)

Wildcards will set the projection type to ALL, and will be retained in the projection list. Retaining the wildcard is important because multiple consumers insert columns at the wildcard position. For example:
SELECT filename, *, filepath FROM ...