org.eigenbase.sql.validate
Class SelectNamespace

java.lang.Object
  extended by org.eigenbase.sql.validate.AbstractNamespace
      extended by org.eigenbase.sql.validate.SelectNamespace
All Implemented Interfaces:
SqlValidatorNamespace

public class SelectNamespace
extends AbstractNamespace

Namespace offered by a subquery.

Since:
Mar 25, 2003
Version:
$Id: //open/dev/farrago/src/org/eigenbase/sql/validate/SelectNamespace.java#15 $
Author:
jhyde
See Also:
SelectScope, SetopNamespace

Field Summary
private  SqlSelect select
           
 
Fields inherited from class org.eigenbase.sql.validate.AbstractNamespace
enclosingNode, rowType, validator
 
Constructor Summary
SelectNamespace(SqlValidatorImpl validator, SqlSelect select, SqlNode enclosingNode)
          Creates a SelectNamespace.
 
Method Summary
 SqlMonotonicity getMonotonicity(String columnName)
          Returns whether and how a given column is sorted.
 SqlSelect getNode()
          Returns the parse tree node at the root of this namespace.
 RelDataType validateImpl()
          Validates this scope and returns the type of the records it returns.
 
Methods inherited from class org.eigenbase.sql.validate.AbstractNamespace
fieldExists, getEnclosingNode, getMonotonicExprs, getRowType, getRowTypeSansSystemColumns, getTable, getValidator, isWrapperFor, lookupChild, makeNullable, setRowType, translate, unwrap, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

select

private final SqlSelect select
Constructor Detail

SelectNamespace

public SelectNamespace(SqlValidatorImpl validator,
                       SqlSelect select,
                       SqlNode enclosingNode)
Creates a SelectNamespace.

Parameters:
validator - Validate
select - Select node
enclosingNode - Enclosing node
Method Detail

getNode

public SqlSelect getNode()
Description copied from interface: SqlValidatorNamespace
Returns the parse tree node at the root of this namespace.

Returns:
parse tree node

validateImpl

public RelDataType validateImpl()
Description copied from class: AbstractNamespace
Validates this scope and returns the type of the records it returns. External users should call AbstractNamespace.validate(), which uses the AbstractNamespace.status field to protect against cycles.

Specified by:
validateImpl in class AbstractNamespace
Returns:
record data type, never null

getMonotonicity

public SqlMonotonicity getMonotonicity(String columnName)
Description copied from interface: SqlValidatorNamespace
Returns whether and how a given column is sorted.

Specified by:
getMonotonicity in interface SqlValidatorNamespace
Overrides:
getMonotonicity in class AbstractNamespace