| Package | Description |
|---|---|
| org.apache.calcite.jdbc |
JDBC driver for Calcite.
|
| org.apache.calcite.materialize |
Management of materialized query results.
|
| org.apache.calcite.prepare |
Preparation of queries (parsing, planning and implementation).
|
| org.apache.calcite.schema |
Schema SPI.
|
| org.apache.calcite.schema.impl |
Utilities to help implement Calcite's SPIs.
|
| org.apache.calcite.sql.validate |
SQL validation.
|
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
CachingCalciteSchema
Concrete implementation of
CalciteSchema that caches tables,
functions and sub-schemas. |
class |
CalciteRootSchema
Deprecated.
|
(package private) class |
SimpleCalciteSchema
A concrete implementation of
CalciteSchema
that maintains minimal state. |
| Modifier and Type | Field and Description |
|---|---|
private CalciteSchema |
CalciteMetaImpl.CalciteMetaSchema.calciteSchema |
private CalciteSchema |
CalciteConnectionImpl.ContextImpl.mutableRootSchema |
private CalciteSchema |
CalciteSchema.parent |
(package private) CalciteSchema |
CalciteConnectionImpl.rootSchema |
private CalciteSchema |
CalciteConnectionImpl.DataContextImpl.rootSchema |
private CalciteSchema |
CalciteConnectionImpl.ContextImpl.rootSchema |
CalciteSchema |
CalcitePrepare.CalciteSignature.rootSchema |
CalciteSchema |
CalciteSchema.Entry.schema |
| Modifier and Type | Field and Description |
|---|---|
(package private) com.google.common.cache.LoadingCache<String,CalciteSchema> |
CachingCalciteSchema.SubSchemaCache.cache
Cached
CalciteSchema wrappers. |
protected NameMap<CalciteSchema> |
CalciteSchema.subSchemaMap |
| Modifier and Type | Method and Description |
|---|---|
CalciteSchema |
CachingCalciteSchema.add(String name,
Schema schema)
Adds a child schema of this schema.
|
abstract CalciteSchema |
CalciteSchema.add(String name,
Schema schema)
Adds a child schema of this schema.
|
CalciteSchema |
SimpleCalciteSchema.add(String name,
Schema schema) |
(package private) CalciteSchema |
CalciteSchema.SchemaPlusImpl.calciteSchema() |
static CalciteSchema |
CalciteSchema.createRootSchema(boolean addMetadataSchema)
Creates a root schema.
|
static CalciteSchema |
CalciteSchema.createRootSchema(boolean addMetadataSchema,
boolean cache)
Creates a root schema.
|
static CalciteSchema |
CalciteSchema.createRootSchema(boolean addMetadataSchema,
boolean cache,
String name)
Creates a root schema.
|
CalciteSchema |
CalciteSchema.createSnapshot(SchemaVersion version)
Creates a snapshot of this CalciteSchema as of the specified time.
|
static CalciteSchema |
CalciteSchema.from(SchemaPlus plus) |
protected CalciteSchema |
CachingCalciteSchema.getImplicitSubSchema(String schemaName,
boolean caseSensitive) |
protected abstract CalciteSchema |
CalciteSchema.getImplicitSubSchema(String schemaName,
boolean caseSensitive)
Returns a sub-schema with a given name that is defined implicitly
(that is, by the underlying
Schema object, not explicitly
by a call to add(String, Schema)), or null. |
protected CalciteSchema |
SimpleCalciteSchema.getImplicitSubSchema(String schemaName,
boolean caseSensitive) |
CalciteSchema |
CalciteConnectionImpl.ContextImpl.getMutableRootSchema() |
CalciteSchema |
CalcitePrepare.Context.getMutableRootSchema()
Returns the root schema for statements that need to be able to modify
schemas and have the results available to other statements.
|
CalciteSchema |
CalciteConnectionImpl.ContextImpl.getRootSchema() |
CalciteSchema |
CalcitePrepare.Context.getRootSchema()
Returns the root schema for statements that need a read-consistent
snapshot.
|
CalciteSchema |
CalciteSchema.getSubSchema(String schemaName,
boolean caseSensitive) |
CalciteSchema |
CalciteSchema.root() |
protected CalciteSchema |
CachingCalciteSchema.snapshot(CalciteSchema parent,
SchemaVersion version) |
protected abstract CalciteSchema |
CalciteSchema.snapshot(CalciteSchema parent,
SchemaVersion version)
Returns a snapshot representation of this CalciteSchema.
|
protected CalciteSchema |
SimpleCalciteSchema.snapshot(CalciteSchema parent,
SchemaVersion version) |
| Modifier and Type | Method and Description |
|---|---|
NavigableMap<String,CalciteSchema> |
CalciteSchema.getSubSchemaMap()
Returns a collection of sub-schemas, both explicit (defined using
add(String, org.apache.calcite.schema.Schema)) and implicit
(defined using Schema.getSubSchemaNames()
and Schema.getSubSchema(String)). |
| Modifier and Type | Method and Description |
|---|---|
static CalciteConnection |
CalciteMetaImpl.connect(CalciteSchema schema,
JavaTypeFactory typeFactory)
A trojan-horse method, subject to change without notice.
|
(package private) CalciteConnection |
Driver.connect(CalciteSchema rootSchema,
JavaTypeFactory typeFactory)
Creates an internal connection.
|
DataContext |
CalciteConnectionImpl.createDataContext(Map<String,Object> parameterValues,
CalciteSchema rootSchema) |
CalciteJdbc41Factory.CalciteJdbc41Connection |
CalciteJdbc41Factory.newConnection(org.apache.calcite.avatica.UnregisteredDriver driver,
org.apache.calcite.avatica.AvaticaFactory factory,
String url,
Properties info,
CalciteSchema rootSchema,
JavaTypeFactory typeFactory) |
abstract org.apache.calcite.avatica.AvaticaConnection |
CalciteFactory.newConnection(org.apache.calcite.avatica.UnregisteredDriver driver,
org.apache.calcite.avatica.AvaticaFactory factory,
String url,
Properties info,
CalciteSchema rootSchema,
JavaTypeFactory typeFactory)
Creates a connection with a root schema.
|
protected CalciteSchema |
CachingCalciteSchema.snapshot(CalciteSchema parent,
SchemaVersion version) |
protected abstract CalciteSchema |
CalciteSchema.snapshot(CalciteSchema parent,
SchemaVersion version)
Returns a snapshot representation of this CalciteSchema.
|
protected CalciteSchema |
SimpleCalciteSchema.snapshot(CalciteSchema parent,
SchemaVersion version) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
CachingCalciteSchema.addImplicitSubSchemaToBuilder(com.google.common.collect.ImmutableSortedMap.Builder<String,CalciteSchema> builder) |
protected abstract void |
CalciteSchema.addImplicitSubSchemaToBuilder(com.google.common.collect.ImmutableSortedMap.Builder<String,CalciteSchema> builder)
Adds implicit sub-schemas to a builder.
|
protected void |
SimpleCalciteSchema.addImplicitSubSchemaToBuilder(com.google.common.collect.ImmutableSortedMap.Builder<String,CalciteSchema> builder) |
| Constructor and Description |
|---|
CachingCalciteSchema(CalciteSchema parent,
Schema schema,
String name)
Creates a CachingCalciteSchema.
|
CachingCalciteSchema(CalciteSchema parent,
Schema schema,
String name,
NameMap<CalciteSchema> subSchemaMap,
NameMap<CalciteSchema.TableEntry> tableMap,
NameMap<CalciteSchema.LatticeEntry> latticeMap,
NameMultimap<CalciteSchema.FunctionEntry> functionMap,
NameSet functionNames,
NameMap<CalciteSchema.FunctionEntry> nullaryFunctionMap,
List<? extends List<String>> path) |
CalciteConnectionImpl(Driver driver,
org.apache.calcite.avatica.AvaticaFactory factory,
String url,
Properties info,
CalciteSchema rootSchema,
JavaTypeFactory typeFactory)
Creates a CalciteConnectionImpl.
|
CalciteJdbc41Connection(Driver driver,
org.apache.calcite.avatica.AvaticaFactory factory,
String url,
Properties info,
CalciteSchema rootSchema,
JavaTypeFactory typeFactory) |
CalciteMetaSchema(CalciteSchema calciteSchema,
String tableCatalog,
String tableSchem) |
CalciteSchema(CalciteSchema parent,
Schema schema,
String name,
NameMap<CalciteSchema> subSchemaMap,
NameMap<CalciteSchema.TableEntry> tableMap,
NameMap<CalciteSchema.LatticeEntry> latticeMap,
NameMultimap<CalciteSchema.FunctionEntry> functionMap,
NameSet functionNames,
NameMap<CalciteSchema.FunctionEntry> nullaryFunctionMap,
List<? extends List<String>> path) |
CalciteSignature(String sql,
List<org.apache.calcite.avatica.AvaticaParameter> parameterList,
Map<String,Object> internalParameters,
RelDataType rowType,
List<org.apache.calcite.avatica.ColumnMetaData> columns,
org.apache.calcite.avatica.Meta.CursorFactory cursorFactory,
CalciteSchema rootSchema,
List<RelCollation> collationList,
long maxRowCount,
Bindable<T> bindable)
Deprecated.
|
CalciteSignature(String sql,
List<org.apache.calcite.avatica.AvaticaParameter> parameterList,
Map<String,Object> internalParameters,
RelDataType rowType,
List<org.apache.calcite.avatica.ColumnMetaData> columns,
org.apache.calcite.avatica.Meta.CursorFactory cursorFactory,
CalciteSchema rootSchema,
List<RelCollation> collationList,
long maxRowCount,
Bindable<T> bindable,
org.apache.calcite.avatica.Meta.StatementType statementType) |
DataContextImpl(CalciteConnectionImpl connection,
Map<String,Object> parameters,
CalciteSchema rootSchema) |
Entry(CalciteSchema schema,
String name) |
FunctionEntry(CalciteSchema schema,
String name) |
FunctionEntryImpl(CalciteSchema schema,
String name,
Function function)
Creates a FunctionEntryImpl.
|
LatticeEntry(CalciteSchema schema,
String name) |
LatticeEntryImpl(CalciteSchema schema,
String name,
Lattice lattice)
Creates a LatticeEntryImpl.
|
SimpleCalciteSchema(CalciteSchema parent,
Schema schema,
String name)
Creates a SimpleCalciteSchema.
|
SimpleCalciteSchema(CalciteSchema parent,
Schema schema,
String name,
NameMap<CalciteSchema> subSchemaMap,
NameMap<CalciteSchema.TableEntry> tableMap,
NameMap<CalciteSchema.LatticeEntry> latticeMap,
NameMultimap<CalciteSchema.FunctionEntry> functionMap,
NameSet functionNames,
NameMap<CalciteSchema.FunctionEntry> nullaryFunctionMap,
List<? extends List<String>> path) |
SubSchemaCache(CalciteSchema calciteSchema,
Set<String> names) |
TableEntry(CalciteSchema schema,
String name,
com.google.common.collect.ImmutableList<String> sqls) |
TableEntryImpl(CalciteSchema schema,
String name,
Table table,
com.google.common.collect.ImmutableList<String> sqls)
Creates a TableEntryImpl.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) CalciteSchema |
MaterializationActor.Materialization.rootSchema |
CalciteSchema |
Lattice.rootSchema |
private CalciteSchema |
Lattice.Builder.rootSchema |
(package private) CalciteSchema |
MaterializationActor.QueryKey.schema |
| Modifier and Type | Method and Description |
|---|---|
static Lattice.Builder |
Lattice.builder(CalciteSchema calciteSchema,
String sql) |
static Lattice |
Lattice.create(CalciteSchema schema,
String sql,
boolean auto)
Creates a Lattice.
|
Table |
MaterializationService.TableFactory.createTable(CalciteSchema schema,
String viewSql,
List<String> viewSchemaPath) |
Table |
MaterializationService.DefaultTableFactory.createTable(CalciteSchema schema,
String viewSql,
List<String> viewSchemaPath) |
MaterializationKey |
MaterializationService.defineMaterialization(CalciteSchema schema,
TileKey tileKey,
String viewSql,
List<String> viewSchemaPath,
String suggestedTableName,
boolean create,
boolean existing)
Defines a new materialization.
|
MaterializationKey |
MaterializationService.defineMaterialization(CalciteSchema schema,
TileKey tileKey,
String viewSql,
List<String> viewSchemaPath,
String suggestedTableName,
MaterializationService.TableFactory tableFactory,
boolean create,
boolean existing)
Defines a new materialization.
|
Pair<CalciteSchema.TableEntry,TileKey> |
MaterializationService.defineTile(Lattice lattice,
ImmutableBitSet groupSet,
List<Lattice.Measure> measureList,
CalciteSchema schema,
boolean create,
boolean exact)
Defines a tile.
|
Pair<CalciteSchema.TableEntry,TileKey> |
MaterializationService.defineTile(Lattice lattice,
ImmutableBitSet groupSet,
List<Lattice.Measure> measureList,
CalciteSchema schema,
boolean create,
boolean exact,
String suggestedTableName,
MaterializationService.TableFactory tableFactory) |
List<Prepare.Materialization> |
MaterializationService.query(CalciteSchema rootSchema)
Gathers a list of all materialized tables known within a given root
schema.
|
| Constructor and Description |
|---|
Builder(CalciteSchema schema,
String sql) |
Lattice(CalciteSchema rootSchema,
com.google.common.collect.ImmutableList<Lattice.Node> nodes,
boolean auto,
boolean algorithm,
long algorithmMaxMillis,
LatticeStatisticProvider.Factory statisticProviderFactory,
Double rowCountEstimate,
com.google.common.collect.ImmutableList<Lattice.Column> columns,
com.google.common.collect.ImmutableList<Lattice.Measure> defaultMeasures,
com.google.common.collect.ImmutableList<Lattice.Tile> tiles) |
Materialization(MaterializationKey key,
CalciteSchema rootSchema,
CalciteSchema.TableEntry materializedTable,
String sql,
RelDataType rowType,
List<String> viewSchemaPath)
Creates a materialization.
|
QueryKey(String sql,
CalciteSchema schema,
List<String> path) |
| Modifier and Type | Field and Description |
|---|---|
protected CalciteSchema |
CalciteCatalogReader.rootSchema |
protected CalciteSchema |
CalcitePrepareImpl.CalcitePreparingStmt.schema |
| Modifier and Type | Method and Description |
|---|---|
CalciteSchema |
CalciteCatalogReader.getRootSchema() |
| Modifier and Type | Method and Description |
|---|---|
private SqlMonikerImpl |
CalciteCatalogReader.moniker(CalciteSchema schema,
String name,
SqlMonikerType type) |
private void |
CalciteMaterializer.useStar(CalciteSchema schema,
Prepare.Materialization materialization)
Converts a relational expression to use a
StarTable defined in schema. |
private Iterable<CalciteMaterializer.Callback> |
CalciteMaterializer.useStar(CalciteSchema schema,
RelNode queryRel)
Converts a relational expression to use a
StarTable defined in schema. |
| Constructor and Description |
|---|
CalciteCatalogReader(CalciteSchema rootSchema,
List<String> defaultSchema,
RelDataTypeFactory typeFactory,
CalciteConnectionConfig config) |
CalciteCatalogReader(CalciteSchema rootSchema,
SqlNameMatcher nameMatcher,
List<List<String>> schemaPaths,
RelDataTypeFactory typeFactory,
CalciteConnectionConfig config) |
CalciteMaterializer(CalcitePrepareImpl prepare,
CalcitePrepare.Context context,
Prepare.CatalogReader catalogReader,
CalciteSchema schema,
RelOptPlanner planner,
SqlRexConvertletTable convertletTable) |
CalcitePreparingStmt(CalcitePrepareImpl prepare,
CalcitePrepare.Context context,
Prepare.CatalogReader catalogReader,
RelDataTypeFactory typeFactory,
CalciteSchema schema,
EnumerableRel.Prefer prefer,
RelOptPlanner planner,
Convention resultConvention,
SqlRexConvertletTable convertletTable) |
| Modifier and Type | Method and Description |
|---|---|
static CalciteSchema |
Schemas.subSchema(CalciteSchema schema,
Iterable<String> names)
Returns a sub-schema of a given schema obtained by following a sequence
of names.
|
| Modifier and Type | Method and Description |
|---|---|
static CalcitePrepare.AnalyzeViewResult |
Schemas.analyzeView(CalciteConnection connection,
CalciteSchema schema,
List<String> schemaPath,
String viewSql,
List<String> viewPath,
boolean fail)
Analyzes a view.
|
static CalcitePrepare.ConvertResult |
Schemas.convert(CalciteConnection connection,
CalciteSchema schema,
List<String> schemaPath,
String sql)
Parses and validates a SQL query and converts to relational algebra.
|
private static void |
Schemas.gatherLattices(CalciteSchema schema,
List<CalciteSchema.LatticeEntry> list) |
static List<CalciteSchema.LatticeEntry> |
Schemas.getLatticeEntries(CalciteSchema schema)
Returns the lattices defined in a schema.
|
static List<Lattice> |
Schemas.getLattices(CalciteSchema schema)
Returns the lattices defined in a schema.
|
static List<CalciteSchema.TableEntry> |
Schemas.getStarTables(CalciteSchema schema)
Returns the star tables defined in a schema.
|
private static CalcitePrepare.Context |
Schemas.makeContext(CalciteConnection connection,
CalciteSchema schema,
List<String> schemaPath,
List<String> objectPath,
com.google.common.collect.ImmutableMap<CalciteConnectionProperty,String> propValues)
Creates a context for the purposes of preparing a statement.
|
private static CalcitePrepare.Context |
Schemas.makeContext(CalciteConnectionConfig connectionConfig,
JavaTypeFactory typeFactory,
DataContext dataContext,
CalciteSchema schema,
List<String> schemaPath,
List<String> objectPath_) |
static CalcitePrepare.ParseResult |
Schemas.parse(CalciteConnection connection,
CalciteSchema schema,
List<String> schemaPath,
String sql)
Parses and validates a SQL query.
|
static Path |
Schemas.path(CalciteSchema rootSchema,
Iterable<String> names)
Creates a path with a given list of names starting from a given root
schema.
|
static CalcitePrepare.CalciteSignature<Object> |
Schemas.prepare(CalciteConnection connection,
CalciteSchema schema,
List<String> schemaPath,
String sql,
com.google.common.collect.ImmutableMap<CalciteConnectionProperty,String> map)
Prepares a SQL query for execution.
|
static CalciteSchema |
Schemas.subSchema(CalciteSchema schema,
Iterable<String> names)
Returns a sub-schema of a given schema obtained by following a sequence
of names.
|
static String |
Schemas.uniqueTableName(CalciteSchema schema,
String base)
Generates a table name that is unique within the given schema.
|
| Modifier and Type | Field and Description |
|---|---|
protected CalciteSchema |
ViewTableMacro.schema |
| Modifier and Type | Method and Description |
|---|---|
static MaterializedViewTable.MaterializedViewTableMacro |
MaterializedViewTable.create(CalciteSchema schema,
String viewSql,
List<String> viewSchemaPath,
List<String> viewPath,
String suggestedTableName,
boolean existing)
Table macro that returns a materialized view.
|
protected ModifiableViewTable |
ViewTableMacro.modifiableViewTable(CalcitePrepare.AnalyzeViewResult parsed,
String viewSql,
List<String> schemaPath,
List<String> viewPath,
CalciteSchema schema)
Allows a sub-class to return an extension of
ModifiableViewTable
by overriding this method. |
| Constructor and Description |
|---|
MaterializedViewTableMacro(CalciteSchema schema,
String viewSql,
List<String> viewSchemaPath,
List<String> viewPath,
String suggestedTableName,
boolean existing) |
ViewTableMacro(CalciteSchema schema,
String viewSql,
List<String> schemaPath,
List<String> viewPath,
Boolean modifiable)
Creates a ViewTableMacro.
|
| Modifier and Type | Method and Description |
|---|---|
CalciteSchema |
SqlValidatorCatalogReader.getRootSchema()
Returns the root namespace for name resolution.
|
static CalciteSchema |
SqlValidatorUtil.getSchema(CalciteSchema rootSchema,
Iterable<String> schemaPath,
SqlNameMatcher nameMatcher)
Finds and returns
CalciteSchema nested to the given rootSchema
with specified schemaPath. |
| Modifier and Type | Method and Description |
|---|---|
private Table |
SqlValidatorImpl.findTable(CalciteSchema schema,
String tableName,
boolean caseSensitive) |
static CalciteSchema |
SqlValidatorUtil.getSchema(CalciteSchema rootSchema,
Iterable<String> schemaPath,
SqlNameMatcher nameMatcher)
Finds and returns
CalciteSchema nested to the given rootSchema
with specified schemaPath. |
private static CalciteSchema.TableEntry |
SqlValidatorUtil.getTableEntryFrom(CalciteSchema schema,
String name,
boolean caseSensitive) |
private void |
EmptyScope.resolve_(CalciteSchema rootSchema,
List<String> names,
List<String> schemaNames,
SqlNameMatcher nameMatcher,
SqlValidatorScope.Path path,
SqlValidatorScope.Resolved resolved) |
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.