Logical
This page contains the API documentation for all of the logical operators in PZ.
LogicalOperator
A logical operator is an operator that operates on Sets.
Right now it can be one of: - BaseScan (scans data from DataReader) - CacheScan (scans cached Set) - FilteredScan (scans input Set and applies filter) - ConvertScan (scans input Set and converts it to new Schema) - LimitScan (scans up to N records from a Set) - GroupByAggregate (applies a group by on the Set) - Aggregate (applies an aggregation on the Set) - RetrieveScan (fetches documents from a provided input for a given query) - Map (applies a function to each record in the Set without adding any new columns)
Every logical operator must declare the get_logical_id_params() and get_logical_op_params() methods, which return dictionaries of parameters that are used to compute the logical op id and to implement the logical operator (respectively).
get_logical_id_params
Returns a dictionary mapping of logical operator parameters which are relevant for computing the logical operator id.
NOTE: Should be overriden by subclasses to include class-specific parameters. NOTE: input_schema and output_schema are not included in the id params because they depend on how the Optimizer orders operations.
Aggregate
Bases: LogicalOperator
Aggregate is a logical operator that applies an aggregation to the input set and yields a single result. This is a base class that has to be further specialized to implement specific aggregation functions.
BaseScan
Bases: LogicalOperator
A BaseScan is a logical operator that represents a scan of a particular data source.
CacheScan
Bases: LogicalOperator
A CacheScan is a logical operator that represents a scan of a cached Set.
ConvertScan
Bases: LogicalOperator
A ConvertScan is a logical operator that represents a scan of a particular data source, with conversion applied.
FilteredScan
Bases: LogicalOperator
A FilteredScan is a logical operator that represents a scan of a particular data source, with filters applied.
GroupByAggregate
Bases: LogicalOperator
LimitScan
Bases: LogicalOperator
Project
Bases: LogicalOperator
RetrieveScan
Bases: LogicalOperator
A RetrieveScan is a logical operator that represents a scan of a particular data source, with a convert-like retrieve applied.