Provides a logical query plan analyzer, which translates UnresolvedAttributes and UnresolvedRelations into fully typed objects using information in a schema Catalog and a FunctionRegistry.
An interface for looking up relations by name.
An interface for looking up relations by name. Used by an Analyzer.
A catalog for looking up user defined functions, used by an Analyzer.
A collection of Rules that can be used to coerce differing types that participate in operations into compatible ones.
A collection of Rules that can be used to coerce differing types that participate in operations into compatible ones. Most of these rules are based on Hive semantics, but they do not introduce any dependencies on the hive codebase. For this reason they remain in Catalyst until we have a more standard set of coercions.
A trait that should be mixed into query operators where an single instance might appear multiple times in a logical query plan.
A trait that should be mixed into query operators where an single instance might appear multiple times in a logical query plan. It is invalid to have multiple copies of the same attribute produced by distinct operators in a query tree as this breaks the guarantee that expression ids, which are used to differentiate attributes, are unique.
Before analysis, all operators that include this trait will be asked to produce a new version of itself with globally unique expression ids.
A trait that can be mixed in with other Catalogs allowing specific tables to be overridden with new logical plans.
A trait that can be mixed in with other Catalogs allowing specific tables to be overridden with new logical plans. This can be used to bind query result to virtual tables, or replace tables with in-memory cached versions. Note that the set of overrides is stored in memory and thus lost when the JVM exits.
Responsible for resolving which identifiers refer to the same entity.
Responsible for resolving which identifiers refer to the same entity. For example, by using case insensitive equality.
Represents all of the input attributes to a given relational operator, for example in "SELECT * FROM ...".
Represents all of the input attributes to a given relational operator, for example in "SELECT * FROM ...".
an optional table that should be the target of the expansion. If omitted all tables' columns are produced.
Holds the name of an attribute that has yet to be resolved.
Thrown when an invalid attempt is made to access a property of a tree that has yet to be fully resolved.
Holds the name of a relation that has yet to be looked up in a Catalog.
Removes Subquery operators from the plan.
Removes Subquery operators from the plan. Subqueries are only required to provide scoping information for attributes and can be removed once analysis is complete.
A trivial catalog that returns an error when a relation is requested.
A trivial catalog that returns an error when a relation is requested. Used for testing when all relations are already filled in and the analyser needs only to resolve attribute references.
A trivial catalog that returns an error when a function is requested.
A trivial catalog that returns an error when a function is requested. Used for testing when all functions are already filled in and the analyser needs only to resolve attribute references.
If any MultiInstanceRelation appears more than once in the query plan then the plan is updated so that each instance has unique expression ids for the attributes produced.
A trivial Analyzer with an EmptyCatalog and EmptyFunctionRegistry.
A trivial Analyzer with an EmptyCatalog and EmptyFunctionRegistry. Used for testing when all relations are already filled in and the analyser needs only to resolve attribute references.
Provides a logical query plan Analyzer and supporting classes for performing analysis. Analysis consists of translating UnresolvedAttributes and UnresolvedRelations into fully typed objects using information in a schema Catalog.