|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eigenbase.sql.validate.AbstractNamespace
abstract class AbstractNamespace
Abstract implementation of SqlValidatorNamespace.
| Field Summary | |
|---|---|
protected SqlNode |
enclosingNode
|
private boolean |
forceNullable
|
protected RelDataType |
rowType
Type of the output row, which comprises the name and type of each output column. |
private SqlValidatorImpl.Status |
status
Whether this scope is currently being validated. |
protected SqlValidatorImpl |
validator
|
| Constructor Summary | |
|---|---|
AbstractNamespace(SqlValidatorImpl validator,
SqlNode enclosingNode)
Creates an AbstractNamespace. |
|
| Method Summary | ||
|---|---|---|
boolean |
fieldExists(String name)
Returns whether this namespace has a field of a given name. |
|
SqlNode |
getEnclosingNode()
Returns the parse tree node that at is at the root of this namespace and includes all decorations. |
|
List<Pair<SqlNode,SqlMonotonicity>> |
getMonotonicExprs()
Returns a list of expressions which are monotonic in this namespace. |
|
SqlMonotonicity |
getMonotonicity(String columnName)
Returns whether and how a given column is sorted. |
|
RelDataType |
getRowType()
Returns the row type of this namespace, which comprises a list of names and types of the output columns. |
|
RelDataType |
getRowTypeSansSystemColumns()
Returns the row type of this namespace, sans any system columns. |
|
SqlValidatorTable |
getTable()
Returns the underlying table, or null if there is none. |
|
SqlValidator |
getValidator()
Returns the validator. |
|
boolean |
isWrapperFor(Class<?> clazz)
Returns whether this namespace implements a given interface, or wraps a class which does. |
|
SqlValidatorNamespace |
lookupChild(String name)
Looks up a child namespace of a given name. |
|
void |
makeNullable()
Makes all fields in this namespace nullable (typically because it is on the outer side of an outer join. |
|
void |
setRowType(RelDataType rowType)
Allows RowType for the namespace to be explicitly set. |
|
String |
translate(String name)
Translates a field name to the name in the underlying namespace. |
|
|
unwrap(Class<T> clazz)
Returns this namespace, or a wrapped namespace, cast to a particular class. |
|
void |
validate()
Validates this namespace. |
|
protected abstract RelDataType |
validateImpl()
Validates this scope and returns the type of the records it returns. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eigenbase.sql.validate.SqlValidatorNamespace |
|---|
getNode |
| Field Detail |
|---|
protected final SqlValidatorImpl validator
private SqlValidatorImpl.Status status
protected RelDataType rowType
private boolean forceNullable
protected final SqlNode enclosingNode
| Constructor Detail |
|---|
AbstractNamespace(SqlValidatorImpl validator,
SqlNode enclosingNode)
validator - ValidatorenclosingNode - Enclosing node| Method Detail |
|---|
public SqlValidator getValidator()
SqlValidatorNamespace
getValidator in interface SqlValidatorNamespacepublic final void validate()
SqlValidatorNamespaceIf the scope has already been validated, does nothing.
Please call SqlValidatorImpl.validateNamespace(org.eigenbase.sql.validate.SqlValidatorNamespace) rather than
calling this method directly.
validate in interface SqlValidatorNamespaceprotected abstract RelDataType validateImpl()
validate(), which uses the status field to protect against cycles.
public RelDataType getRowType()
SqlValidatorNamespace
getRowType in interface SqlValidatorNamespacepublic RelDataType getRowTypeSansSystemColumns()
SqlValidatorNamespace
getRowTypeSansSystemColumns in interface SqlValidatorNamespacepublic void setRowType(RelDataType rowType)
SqlValidatorNamespace
setRowType in interface SqlValidatorNamespacepublic SqlNode getEnclosingNode()
SqlValidatorNamespaceSqlValidatorNamespace.getNode().
getEnclosingNode in interface SqlValidatorNamespacepublic SqlValidatorTable getTable()
SqlValidatorNamespace
getTable in interface SqlValidatorNamespacepublic SqlValidatorNamespace lookupChild(String name)
SqlValidatorNamespaceFor example, in the query select e.name from emps as e,
e is an IdentifierNamespace which has a child
name which is a FieldNamespace.
lookupChild in interface SqlValidatorNamespacename - Name of namespace
public boolean fieldExists(String name)
SqlValidatorNamespace
fieldExists in interface SqlValidatorNamespacename - Field name
public List<Pair<SqlNode,SqlMonotonicity>> getMonotonicExprs()
SqlValidatorNamespaceSqlIdentifier called "TIMESTAMP".
getMonotonicExprs in interface SqlValidatorNamespacepublic SqlMonotonicity getMonotonicity(String columnName)
SqlValidatorNamespace
getMonotonicity in interface SqlValidatorNamespacepublic void makeNullable()
SqlValidatorNamespace
makeNullable in interface SqlValidatorNamespacepublic String translate(String name)
SqlValidatorNamespace
translate in interface SqlValidatorNamespacepublic <T> T unwrap(Class<T> clazz)
SqlValidatorNamespace
unwrap in interface SqlValidatorNamespaceclazz - Desired type
public boolean isWrapperFor(Class<?> clazz)
SqlValidatorNamespace
isWrapperFor in interface SqlValidatorNamespaceclazz - Interface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||