de.fuberlin.wiwiss.d2rq.algebra
Interface RelationalOperators

All Known Implementing Classes:
MutableRelation, Relation, RelationImpl

public interface RelationalOperators


Field Summary
static RelationalOperators DUMMY
           
 
Method Summary
 Relation project(Set<? extends ProjectionSpec> projectionSpecs)
          Applies the projection operator to this relation.
 Relation renameColumns(ColumnRenamer renamer)
          Applies the rename operator to this relation.
 Relation select(Expression condition)
          Applies the selection operator to this relation.
 

Field Detail

DUMMY

static final RelationalOperators DUMMY
Method Detail

select

Relation select(Expression condition)

Applies the selection operator to this relation. The new relation will contain only the tuples for which the expression evaluates to true.

Selection on attributes that don't exist in the relation are considered to be always false and will cause an empty relation.

Parameters:
condition - A boolean expression
Returns:
A relation whose tuples satisfy the condition

renameColumns

Relation renameColumns(ColumnRenamer renamer)

Applies the rename operator to this relation.

Renames of attributes that don't exist in the relation are ignored.

Parameters:
renamer - A map from original to replacement names
Returns:
A relation in which all occurrences of the old names have been replaced with the new ones

project

Relation project(Set<? extends ProjectionSpec> projectionSpecs)

Applies the projection operator to this relation.

The new relation will contain only the attributes given as the argument.

Parameters:
projectionSpecs - A set of ProjectionSpec instances
Returns:
A relation having the specified attributes