public class ViewTable extends AbstractQueryableTable implements TranslatableTable
It is not evaluated; it is expanded during query planning.
elementType| Constructor and Description |
|---|
ViewTable(Type elementType,
RelProtoDataType rowType,
String viewSql,
List<String> schemaPath) |
| Modifier and Type | Method and Description |
|---|---|
<T> Queryable<T> |
asQueryable(QueryProvider queryProvider,
SchemaPlus schema,
String tableName)
Converts this table into a
Queryable. |
Schema.TableType |
getJdbcTableType()
Type of table.
|
RelDataType |
getRowType(RelDataTypeFactory typeFactory)
Returns this table's row type.
|
List<String> |
getSchemaPath()
Returns the the schema path of the view.
|
String |
getViewSql()
Returns the view's SQL definition.
|
RelNode |
toRel(RelOptTable.ToRelContext context,
RelOptTable relOptTable)
Converts this table into a
relational expression. |
static org.apache.calcite.schema.impl.ViewTable.ViewTableMacro |
viewMacro(SchemaPlus schema,
String viewSql,
List<String> schemaPath)
Table macro that returns a view.
|
getElementType, getExpressiongetStatisticclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetStatisticpublic ViewTable(Type elementType, RelProtoDataType rowType, String viewSql, List<String> schemaPath)
public static org.apache.calcite.schema.impl.ViewTable.ViewTableMacro viewMacro(SchemaPlus schema, String viewSql, List<String> schemaPath)
public Schema.TableType getJdbcTableType()
TablegetJdbcTableType in interface TablegetJdbcTableType in class AbstractTablepublic RelDataType getRowType(RelDataTypeFactory typeFactory)
TableThis is a struct type whose fields describe the names and types of the columns in this table.
The implementer must use the type factory provided. This ensures that the type is converted into a canonical form; other equal types in the same query will use the same object.
getRowType in interface TabletypeFactory - Type factory with which to create the typepublic <T> Queryable<T> asQueryable(QueryProvider queryProvider, SchemaPlus schema, String tableName)
QueryableTableQueryable.asQueryable in interface QueryableTablepublic RelNode toRel(RelOptTable.ToRelContext context, RelOptTable relOptTable)
TranslatableTablerelational expression.toRel in interface TranslatableTablepublic String getViewSql()
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.