simpledb.query
Interface Plan

All Known Implementing Classes:
GroupByPlan, IndexJoinPlan, IndexSelectPlan, MaterializePlan, MergeJoinPlan, MultiBufferProductPlan, ProductPlan, ProjectPlan, SelectPlan, SortPlan, TablePlan

public interface Plan

The interface implemented by each query plan. There is a Plan class for each relational algebra operator.

Author:
Edward Sciore

Method Summary
 int blocksAccessed()
          Returns an estimate of the number of block accesses that will occur when the scan is read to completion.
 int distinctValues(String fldname)
          Returns an estimate of the number of distinct values for the specified field in the query's output table.
 Scan open()
          Opens a scan corresponding to this plan.
 int recordsOutput()
          Returns an estimate of the number of records in the query's output table.
 Schema schema()
          Returns the schema of the query.
 

Method Detail

open

Scan open()
Opens a scan corresponding to this plan. The scan will be positioned before its first record.

Returns:
a scan

blocksAccessed

int blocksAccessed()
Returns an estimate of the number of block accesses that will occur when the scan is read to completion.

Returns:
the estimated number of block accesses

recordsOutput

int recordsOutput()
Returns an estimate of the number of records in the query's output table.

Returns:
the estimated number of output records

distinctValues

int distinctValues(String fldname)
Returns an estimate of the number of distinct values for the specified field in the query's output table.

Parameters:
fldname - the name of a field
Returns:
the estimated number of distinct field values in the output

schema

Schema schema()
Returns the schema of the query.

Returns:
the query's schema


Copyright © 2011. All Rights Reserved.