Package org.apache.calcite.util.mapping
Interface Mappings.SourceMapping
- All Superinterfaces:
- Iterable<IntPair>,- Mappings.CoreMapping
- All Known Subinterfaces:
- Mapping
- All Known Implementing Classes:
- AbstractSourceMapping,- AbstractTargetMapping,- Mappings.AbstractMapping,- Mappings.FiniteAbstractMapping,- Mappings.IdentityMapping,- Mappings.OverridingSourceMapping,- Mappings.OverridingTargetMapping,- Mappings.PartialMapping,- Permutation
- Enclosing class:
- Mappings
Mapping suitable for sourcing columns.
 
Properties:
- It has a finite number of sources and targets
- Each target has exactly one source
- Each source has at most one target
TODO: figure out which interfaces this should extend
- 
Method SummaryModifier and TypeMethodDescriptionReturns the mapping type.intgetSource(int target) Returns the source that a target maps to.intintgetSourceOpt(int target) Returns the source that a target maps to, or -1 if it is not mapped.intintgetTargetOpt(int source) Returns the target that a source maps to, or -1 if it is not mapped.inverse()booleanMethods inherited from interface java.lang.IterableforEach, iterator, spliteratorMethods inherited from interface org.apache.calcite.util.mapping.Mappings.CoreMappingsize
- 
Method Details- 
getSourceCountint getSourceCount()
- 
getSourceint getSource(int target) Returns the source that a target maps to.- Parameters:
- target- target
- Returns:
- source
- Throws:
- Mappings.NoElementException- if target is not mapped
 
- 
getSourceOptint getSourceOpt(int target) Returns the source that a target maps to, or -1 if it is not mapped.
- 
getTargetCountint getTargetCount()
- 
getTargetOptint getTargetOpt(int source) Returns the target that a source maps to, or -1 if it is not mapped.
- 
getMappingTypeMappingType getMappingType()Description copied from interface:Mappings.CoreMappingReturns the mapping type.- Specified by:
- getMappingTypein interface- Mappings.CoreMapping
- Returns:
- Mapping type
 
- 
isIdentityboolean isIdentity()
- 
inverseMapping inverse()
 
-