Package | Description |
---|---|
edu.berkeley.cs186.database.query |
Modifier and Type | Method and Description |
---|---|
void |
QueryPlan.average(String column)
Add an average on column.
|
String |
QueryOperator.checkSchemaForColumn(Schema schema,
String columnName)
Utility method to determine whether or not a specified column name is valid with a given schema.
|
Schema |
SelectOperator.computeSchema() |
Schema |
SequentialScanOperator.computeSchema() |
protected Schema |
ProjectOperator.computeSchema() |
protected abstract Schema |
QueryOperator.computeSchema() |
Schema |
JoinOperator.computeSchema() |
protected Schema |
GroupByOperator.computeSchema() |
void |
QueryPlan.count()
Add a count aggregate to this query.
|
Iterator<Record> |
SelectOperator.execute() |
Iterator<Record> |
ProjectOperator.execute()
Joins tuples from leftSource with tuples from rightSource based on whether the values in column
leftColumnName are equal to tha values in column rightColumnName.
|
Iterator<Record> |
QueryPlan.execute()
Generates a naïve QueryPlan in which all joins are at the bottom of the DAG followed by all where
predicates, an optional group by operator, and a set of selects (in that order).
|
abstract Iterator<Record> |
QueryOperator.execute() |
Iterator<Record> |
JoinOperator.execute()
Joins tuples from leftSource and rightSource and returns an iterator of records.
|
Iterator<Record> |
GroupByOperator.execute()
Read input tuples from source, group by groupByColumn, and return an iterator.
|
QueryOperator |
QueryOperator.getDestination() |
QueryOperator |
QueryOperator.getSource() |
QueryOperator |
JoinOperator.getSource() |
void |
QueryPlan.groupBy(String column)
Set the group by column for this query.
|
void |
QueryPlan.select(List<String> columnNames)
Add a select operator to the QueryPlan with a list of column names.
|
void |
QueryOperator.setDestination(QueryOperator destination) |
void |
QueryOperator.setSource(QueryOperator source) |
void |
QueryPlan.sum(String column)
Add a sum on column.
|
void |
QueryPlan.where(String column,
QueryPlan.PredicateOperator comparison,
DataBox value)
Add a where operator.
|
Constructor and Description |
---|
GroupByOperator(QueryOperator source,
Database.Transaction transaction,
String groupByColumn)
Create a new GroupByOperator that pulls from source and groups by groupByColumn.
|
JoinOperator(QueryOperator leftSource,
QueryOperator rightSource,
String leftColumnName,
String rightColumnName)
Create a join operator that pulls tuples from leftSource and rightSource.
|
QueryOperator(QueryOperator.OperatorType type,
QueryOperator source) |
ProjectOperator(QueryOperator source,
List<String> columns,
boolean count,
String averageColumn,
String sumColumn)
Creates a new ProjectOperator that reads tuples from source and filters out columns.
|
SequentialScanOperator(Database.Transaction transaction,
String tableName)
Creates a new SequentialScanOperator that provides an iterator on all tuples in a table.
|
SelectOperator(QueryOperator source,
String columnName,
QueryPlan.PredicateOperator operator,
DataBox value)
Creates a new SelectOperator that pulls from source and only returns tuples for which the
predicate is satisfied.
|
Copyright © 2017. All rights reserved.