Class UnboundedRelationException
- All Implemented Interfaces:
Serializable
Relation.toList() and Relation.run() return when the rows are all in
hand, so over an unbounded relation they would not return at all. The refusal is made
before anything runs, and the remedy is in the caller's hands: bound the relation with
limit(n), or take it lazily with Relation.stream(), which is what an
endless relation is for.
The planner raises the same refusal for its own reason: an operator that must buffer its whole input — a sort, a grouping — cannot do so over an input that never ends, and it says so before reading a row. Both are the one fact a caller acts on, so both arrive as this type rather than as two.
Distinct from QueryExecutionException because nothing failed. The query is
sound and the engine is willing; it is the shape of the question that cannot be answered
by a list.
- Since:
- 1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUnboundedRelationException(String message) Creates an exception with the given message.UnboundedRelationException(String message, Throwable cause) Creates an exception with the given message and cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
UnboundedRelationException
Creates an exception with the given message.- Parameters:
message- what went wrong- Since:
- 1.0
-
UnboundedRelationException
Creates an exception with the given message and cause.- Parameters:
message- what went wrongcause- the underlying refusal- Since:
- 1.0
-