net.sf.farrago.query
Class FarragoView

java.lang.Object
  extended by org.eigenbase.relopt.RelOptAbstractTable
      extended by net.sf.farrago.query.FarragoQueryNamedColumnSet
          extended by net.sf.farrago.query.FarragoView
All Implemented Interfaces:
FarragoMedColumnSet, FarragoQueryColumnSet, RelOptTable, SqlValidatorTable

 class FarragoView
extends FarragoQueryNamedColumnSet

An implementation of RelOptTable for accessing a view managed by Farrago.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/query/FarragoView.java#20 $
Author:
John V. Sichi

Field Summary
private  String datasetName
           
private  ModalityType modality
           
 
Fields inherited from class org.eigenbase.relopt.RelOptAbstractTable
name, rowType, schema
 
Constructor Summary
FarragoView(FemLocalView cwmView, RelDataType rowType, String datasetName, ModalityType modality)
          Creates a new FarragoView object.
 
Method Summary
private  RelNode expandView(String queryString)
           
 FemLocalView getFemView()
           
 RelNode toRel(RelOptCluster cluster, RelOptConnection connection)
          Converts this table into a relational expression.
 
Methods inherited from class net.sf.farrago.query.FarragoQueryNamedColumnSet
getAllowedAccess, getCwmColumnSet, getMonotonicity, getPreparingStmt, getQualifiedName, setCwmColumnSet, setPreparingStmt
 
Methods inherited from class org.eigenbase.relopt.RelOptAbstractTable
getCollationList, getName, getRelOptSchema, getRowCount, getRowType, setRowType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eigenbase.relopt.RelOptTable
getCollationList, getRelOptSchema, getRowCount, getRowType
 
Methods inherited from interface org.eigenbase.sql.validate.SqlValidatorTable
getRowType
 

Field Detail

datasetName

private final String datasetName

modality

private final ModalityType modality
Constructor Detail

FarragoView

FarragoView(FemLocalView cwmView,
            RelDataType rowType,
            String datasetName,
            ModalityType modality)
Creates a new FarragoView object.

Parameters:
cwmView - catalog definition for view
rowType - type for rows produced by view
datasetName - Name of sample dataset, or null to use vanilla
modality -
Method Detail

getFemView

public FemLocalView getFemView()

toRel

public RelNode toRel(RelOptCluster cluster,
                     RelOptConnection connection)
Description copied from interface: RelOptTable
Converts this table into a relational expression.

The planner calls this method to convert a table into an initial relational expression, generally something abstract, such as a TableAccessRel, then optimizes this expression by applying rules to transform it into more efficient access methods for this table.

Parameters:
cluster - the cluster the relational expression will belong to
connection - the parse tree of the expression which evaluates to a connection object

expandView

private RelNode expandView(String queryString)