Package nz.org.riskscape.engine.relation
Class EmptyRelation
java.lang.Object
nz.org.riskscape.engine.relation.EmptyRelation
- All Implemented Interfaces:
AutoCloseable,SelfDescribingScalarData,Realized,Relation
A relation that has no values, just a type. Mostly useful for testing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetLimit()longThe type of tuple that come out of this realized thing, orStruct.EMPTY_STRUCTif nothingbooleaniterator()limitAndOffset(long newLimit, long newOffset) Returns a new relation that yields a subset of tuples this relation would normally return.project(Projection projection) restrict(Restriction restriction) size()Get a rough count of the untransformed tuples in the relation.skipInvalid(ProblemSink sendProblemsTo) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nz.org.riskscape.engine.relation.Relation
calculateBounds, getScalarDataType, getSpatialMetadata, getType, limit, offset, stream, toTupleInput
-
Constructor Details
-
EmptyRelation
-
-
Method Details
-
iterator
-
project
-
restrict
-
skipInvalid
- Specified by:
skipInvalidin interfaceRelation- Returns:
- a new relation that skips rows that are invalid for some reason TODO consider whether we need some sort of 'cloneWithOptions' method, that returns a new relation if the options are supported
-
getSourceInformation
- Specified by:
getSourceInformationin interfaceRelation
-
limitAndOffset
Description copied from interface:RelationReturns a new relation that yields a subset of tuples this relation would normally return. This should apply after any filtering that's applied to the relation, even if those filters are applied after a limit and offset.
- Specified by:
limitAndOffsetin interfaceRelation- Returns:
- a new Relation with the limit and offset applied
-
getLimit
public long getLimit() -
getOffset
public long getOffset() -
size
Description copied from interface:RelationGet a rough count of the untransformed tuples in the relation. This may include tuples that are skipped because they are invalid or removed by a
filterbookmark parameter. A rule of thumb is this should match the number of tuples produced byBaseRelation#rawIterator(). -
hasSkipOnInvalid
public boolean hasSkipOnInvalid()- Specified by:
hasSkipOnInvalidin interfaceRelation- Returns:
- true if invalid rows will be skipped for this relation
-
getProducedType
Description copied from interface:RealizedThe type of tuple that come out of this realized thing, or
Struct.EMPTY_STRUCTif nothing- Specified by:
getProducedTypein interfaceRealized- Specified by:
getProducedTypein interfaceRelation
-