The mapping describes where to find the columns wanted by the parent of the current relational expression.
The mapping is a {@link org.eigenbase.util.mapping.Mappings.SourceMapping}, which means that no column can be used more than once, and some columns are not used. {@code columnsUsed.getSource(i)} returns the source of the i'th outputfield.
For example, consider the mapping for a relational expression that has 4 output columns but only two are being used. The mapping {2 → 1, 3 → 0} would give the following behavior:
|
|