org.eigenbase.rel.metadata
Class ReflectiveRelMetadataProvider
java.lang.Object
org.eigenbase.rel.metadata.ReflectiveRelMetadataProvider
- All Implemented Interfaces:
- RelMetadataProvider, ReflectiveVisitor
- Direct Known Subclasses:
- FarragoRelMetadataProvider, FarragoTestPersonalityFactory.FarragoTestRelMetadataProvider, FtrsDataServer.FtrsRelMetadataProvider, LoptMetadataProvider, MedJdbcMetadataProvider, RelMdColumnOrigins, RelMdColumnUniqueness, RelMdDistinctRowCount, RelMdExplainVisibility, RelMdPercentageOriginalRows, RelMdPopulationSize, RelMdRowCount, RelMdSelectivity, RelMdUniqueKeys
public abstract class ReflectiveRelMetadataProvider
- extends Object
- implements RelMetadataProvider, ReflectiveVisitor
ReflectiveRelMetadataProvider provides an abstract base for reflective
implementations of the RelMetadataProvider
interface. For an example,
see DefaultRelMetadataProvider
.
TODO jvs 28-Mar-2006: most of this should probably be refactored into
ReflectUtil.
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/rel/metadata/ReflectiveRelMetadataProvider.java#9 $
- Author:
- John V. Sichi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parameterTypeMap
private final Map<String,List<Class>> parameterTypeMap
visitDispatcher
private final ReflectiveVisitDispatcher<ReflectiveRelMetadataProvider,RelNode> visitDispatcher
ReflectiveRelMetadataProvider
protected ReflectiveRelMetadataProvider()
- Creates a ReflectiveRelMetadataProvider.
mapParameterTypes
protected void mapParameterTypes(String metadataQueryName,
List<Class> parameterTypes)
- Maps the parameter type signature to look up for a given metadata query.
- Parameters:
metadataQueryName
- name of metadata query to mapparameterTypes
- argument types (beyond the overloaded rel type) to
map
getRelMetadata
public Object getRelMetadata(RelNode rel,
String metadataQueryName,
Object[] args)
- Description copied from interface:
RelMetadataProvider
- Retrieves metadata about a relational expression.
- Specified by:
getRelMetadata
in interface RelMetadataProvider
- Parameters:
rel
- relational expression of interestmetadataQueryName
- name of metadata query to invokeargs
- arguments to metadata query (expected number and type depend
on query name; must have well-defined hashCode/equals for use by
caching); null can be used instead of empty array
- Returns:
- metadata result (actual type depends on query name), or null if
the provider cannot answer the given query/rel combination; it is better
to return null than to return a possibly incorrect answer