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,
@Nullable List<String> viewPath) |
| Modifier and Type | Method and Description |
|---|---|
<T> org.apache.calcite.linq4j.Queryable<T> |
asQueryable(org.apache.calcite.linq4j.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 schema path of the view.
|
@Nullable List<String> |
getViewPath()
Returns the 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 ViewTableMacro |
viewMacro(SchemaPlus schema,
String viewSql,
List<String> schemaPath)
Deprecated.
|
static ViewTableMacro |
viewMacro(SchemaPlus schema,
String viewSql,
List<String> schemaPath,
@Nullable Boolean modifiable)
Deprecated.
|
static ViewTableMacro |
viewMacro(SchemaPlus schema,
String viewSql,
List<String> schemaPath,
@Nullable List<String> viewPath,
@Nullable Boolean modifiable)
Table macro that returns a view.
|
getElementType, getExpressiongetStatistic, isRolledUp, rolledUpColumnValidInsideAgg, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetStatistic, isRolledUp, rolledUpColumnValidInsideAggmaybeUnwrap, unwrapOrThrow@Deprecated public static ViewTableMacro viewMacro(SchemaPlus schema, String viewSql, List<String> schemaPath)
@Deprecated public static ViewTableMacro viewMacro(SchemaPlus schema, String viewSql, List<String> schemaPath, @Nullable Boolean modifiable)
public static ViewTableMacro viewMacro(SchemaPlus schema, String viewSql, List<String> schemaPath, @Nullable List<String> viewPath, @Nullable Boolean modifiable)
schema - Schema the view will belong toviewSql - SQL queryschemaPath - Path of schemamodifiable - Whether view is modifiable, or null to deduce itpublic String getViewSql()
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> org.apache.calcite.linq4j.Queryable<T> asQueryable(org.apache.calcite.linq4j.QueryProvider queryProvider,
SchemaPlus schema,
String tableName)
QueryableTableQueryable.asQueryable in interface QueryableTablepublic RelNode toRel(RelOptTable.ToRelContext context, RelOptTable relOptTable)
TranslatableTablerelational expression.toRel in interface TranslatableTableCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.