de.fuberlin.wiwiss.d2rq.algebra
Interface RelationalOperators

All Known Subinterfaces:
Relation
All Known Implementing Classes:
MutableRelation, RelationImpl

public interface RelationalOperators


Method Summary
 Relation renameColumns(ColumnRenamer renamer)
          Applies the rename operator to this relation.
 Relation select(Expression condition)
          Applies the selection operator to this relation.
 

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