- Record Components:
groupingAttributes- the attributes to group by; empty for the whole-relation truth formpredicate- the condition every row of a group must satisfy; never nullinput- the source relation; never nulllocation- the source location of this node; never null
- All Implemented Interfaces:
RelNode
input by the
groupingAttributes and keeps the grouping-key tuple of each group in
which every row satisfies predicate.
This is the "every row of the group satisfies P" operation that SQL forces
into the NOT EXISTS (… NOT P) double-negation — for example, "customers
all of whose orders are completed":
∀ customer_id : status = "completed" (Orders)
Strict NULL semantics: a row whose predicate evaluates to UNKNOWN
counts as not-satisfied and disqualifies its group (the NOT EXISTS
reading, not bool_and).
The output schema is the grouping-key columns only (member rows are
recovered with a semi-join back). With no grouping attributes the
operator is the whole-relation form ∀ : P (R) — "does every row of
R satisfy P?" — whose output is the nullary truth relation
(the empty schema, Schema.empty() — relix-symbol, which this module
deliberately does not depend on, hence no link):
one empty tuple when every row satisfies P (vacuously true on an empty
input), no tuple otherwise.
-
Constructor Summary
ConstructorsConstructorDescriptionUniversalNode(List<String> groupingAttributes, Predicate predicate, RelNode input) Convenience constructor for tests; usesSourceLocation.UNKNOWN.UniversalNode(List<String> groupingAttributes, Predicate predicate, RelNode input, SourceLocation location) Creates an instance of aUniversalNoderecord class. -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(RelNodeVisitor<R> visitor) final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegroupingAttributesrecord component.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.location()Returns the value of thelocationrecord component.Returns the value of thepredicaterecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.darkcollective.relix.ast.RelNode
children, mapChildren, materializationMode, prettyPrint
-
Constructor Details
-
UniversalNode
public UniversalNode(List<String> groupingAttributes, Predicate predicate, RelNode input, SourceLocation location) Creates an instance of aUniversalNoderecord class.- Parameters:
groupingAttributes- the value for thegroupingAttributesrecord componentpredicate- the value for thepredicaterecord componentinput- the value for theinputrecord componentlocation- the value for thelocationrecord component
-
UniversalNode
Convenience constructor for tests; usesSourceLocation.UNKNOWN.
-
-
Method Details
-
accept
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
groupingAttributes
Returns the value of thegroupingAttributesrecord component.- Returns:
- the value of the
groupingAttributesrecord component
-
predicate
Returns the value of thepredicaterecord component.- Returns:
- the value of the
predicaterecord component
-
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-
location
Returns the value of thelocationrecord component.
-