net.sf.farrago.namespace.ftrs
Class FtrsDataServer
java.lang.Object
net.sf.farrago.plugin.FarragoAbstractPluginBase
net.sf.farrago.namespace.impl.MedAbstractBase
net.sf.farrago.namespace.impl.MedAbstractDataServer
net.sf.farrago.namespace.impl.MedAbstractLocalDataServer
net.sf.farrago.namespace.impl.MedAbstractFennelDataServer
net.sf.farrago.namespace.ftrs.FtrsDataServer
- All Implemented Interfaces:
- FarragoMedDataServer, FarragoMedLocalDataServer, FarragoAllocation, ClosableAllocation
class FtrsDataServer
- extends MedAbstractFennelDataServer
FtrsDataServer implements the FarragoMedDataServer
interface for FTRS
data.
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/namespace/ftrs/FtrsDataServer.java#31 $
- Author:
- John V. Sichi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
indexTypeFactory
private FarragoTypeFactory indexTypeFactory
FtrsDataServer
FtrsDataServer(String serverMofId,
Properties props,
FarragoRepos repos)
newColumnSet
public FarragoMedColumnSet newColumnSet(String[] localName,
Properties tableProps,
FarragoTypeFactory typeFactory,
RelDataType rowType,
Map<String,Properties> columnPropMap)
throws SQLException
- Description copied from interface:
FarragoMedDataServer
- Creates an instance of a FarragoMedColumnSet corresponding to row data
identified by properties rather than container name. This supports the
SQL/MED CREATE FOREIGN TABLE statement. As much validation as possible
should be performed, including accessing representative data.
- Parameters:
localName
- the qualified name to assign to the column set within
Farrago; this should NOT be used for finding the actual data, since it
can be set arbitrarily by the caller; instead, it should be used to
implement the RelOptTable.getQualifiedName() method, and can be useful
for correlation during debuggingtableProps
- properties to use for data location and accesstypeFactory
- FarragoTypeFactory to use for defining typesrowType
- type to impose on the rows of this column set (including
column names and types), or null to infer row type; if this is non-null,
it must be saved for use by the getRowType() returned from
FarragoMedColumnSetcolumnPropMap
- map from column name to column-specific Properties;
this is optional and may only be specified when rowType is also specified
(the field names in rowType are used as the keys for columnPropMap)
- Returns:
- new FarragoMedColumnSet
- Throws:
SQLException
- if data access is unsuccessful
registerRules
public void registerRules(RelOptPlanner planner)
- Description copied from interface:
FarragoMedDataServer
- Gives this wrapper a chance to register any special optimization rules.
This method may be called more than once, each time with a different
planner instance.
- Specified by:
registerRules
in interface FarragoMedDataServer
- Overrides:
registerRules
in class MedAbstractDataServer
- Parameters:
planner
- the planner in which the rules should be registered
validateTableDefinition
public void validateTableDefinition(FemLocalTable table,
FemLocalIndex generatedPrimaryKeyIndex)
throws SQLException
- Description copied from interface:
FarragoMedLocalDataServer
- Validates the definition of a table being created. May have side-effects
such as creating additional system-maintained indexes.
- Specified by:
validateTableDefinition
in interface FarragoMedLocalDataServer
- Overrides:
validateTableDefinition
in class MedAbstractLocalDataServer
- Parameters:
table
- definition of the table being createdgeneratedPrimaryKeyIndex
- if non-null, a reference to an index
generated by the system to enforce the primary key
- Throws:
SQLException
constructIndexBuildPlan
public RelNode constructIndexBuildPlan(RelOptTable table,
FemLocalIndex index,
RelOptCluster cluster)
- Description copied from interface:
FarragoMedLocalDataServer
- Creates a plan for loading existing rows of a table into an index.
Typically, the topmost node of this plan will be a
FarragoIndexBuilderRel
, and this plugin will supply
a rule which transforms that into a corresponding physical rel for
writing to the index. Where possible, the returned plan should consist of
logical rels, increasing optimization potential.
- Parameters:
table
- the optimizer representation for the indexed tableindex
- the index to be loadedcluster
- container for newly created relational expressions
- Returns:
- plan which will be used as input to optimization
prepareIndexCmd
protected void prepareIndexCmd(FemIndexCmd cmd,
FemLocalIndex index)
- Description copied from class:
MedAbstractFennelDataServer
- Prepares an index command based on the catalog definition of the index.
The parameterization details of command preparation are
subclass-dependent.
- Specified by:
prepareIndexCmd
in class MedAbstractFennelDataServer
- Parameters:
cmd
- command to be initializedindex
- catalog definition of index
getIncludeTuples
protected boolean getIncludeTuples(FemLocalIndex index)
- Description copied from class:
MedAbstractFennelDataServer
- Whether or not to include tuples in page count statistics
- Specified by:
getIncludeTuples
in class MedAbstractFennelDataServer
registerRelMetadataProviders
public void registerRelMetadataProviders(ChainedRelMetadataProvider chain)
- Description copied from interface:
FarragoMedDataServer
- Gives this wrapper a chance to register one or more
RelMetadataProvider
s in the chain which will be used to answer
relational expression metadata queries during optimization. Wrappers
which define their own relational expressions will generally need to
supply corresponding metadata providers.
- Specified by:
registerRelMetadataProviders
in interface FarragoMedDataServer
- Overrides:
registerRelMetadataProviders
in class MedAbstractDataServer
- Parameters:
chain
- receives wrappers's custom providers, if any
supportsAlterTableAddColumn
public boolean supportsAlterTableAddColumn()
- Description copied from interface:
FarragoMedLocalDataServer
- Checks whether ALTER TABLE ADD COLUMN is implemented for tables stored by
this local data server.
- Specified by:
supportsAlterTableAddColumn
in interface FarragoMedLocalDataServer
- Overrides:
supportsAlterTableAddColumn
in class MedAbstractLocalDataServer
- Returns:
- whether ALTER TABLE ADD COLUMN can be executed