Package com.darkcollective.relix.plan
Record Class PhysicalNode.IntervalJoin
java.lang.Object
java.lang.Record
com.darkcollective.relix.plan.PhysicalNode.IntervalJoin
- Record Components:
relation- the Allen relation to testleftStartIdx- column index of the left interval's start in the left inputleftEndIdx- column index of the left interval's end in the left inputrightStartIdx- column index of the right interval's start in the right inputrightEndIdx- column index of the right interval's end in the right inputmerge- whentrue, use the streaming sort-merge variant
- All Implemented Interfaces:
PhysicalNode
- Enclosing interface:
PhysicalNode
public static record PhysicalNode.IntervalJoin(Schema schema, AllenRelation relation, int leftStartIdx, int leftEndIdx, int rightStartIdx, int rightEndIdx, boolean merge, PhysicalNode left, PhysicalNode right)
extends Record
implements PhysicalNode
Interval join — tests each pair of rows against an Allen interval
algebra relation. Always an inner join (unmatched rows are dropped).
merge selects the executor variant:
false (default) runs the general plane-sweep / sorted-band executor,
which sorts the inputs itself; true runs a streaming sort-merge over
two inputs that already deliver an ascending order on their interval
start column, skipping the global endpoint sort and maintaining a bounded
sliding active set. The planner only sets merge for an
overlap-or-touch relation when both children already satisfy the required
ordering (no inserted PhysicalNode.Sort); PRECEDES/PRECEDED_BY always
use the sorted-band executor.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.darkcollective.relix.plan.PhysicalNode
PhysicalNode.Aggregate, PhysicalNode.AsOfJoin, PhysicalNode.BernoulliSample, PhysicalNode.BuildSide, PhysicalNode.Closure, PhysicalNode.Cluster, PhysicalNode.ConstructiveCover, PhysicalNode.Cover, PhysicalNode.Distinct, PhysicalNode.Division, PhysicalNode.Downsample, PhysicalNode.Empty, PhysicalNode.Fixpoint, PhysicalNode.IntervalJoin, PhysicalNode.Iterate, PhysicalNode.Join, PhysicalNode.JoinAlgorithm, PhysicalNode.JoinKeys, PhysicalNode.JoinKind, PhysicalNode.LateralJoin, PhysicalNode.Limit, PhysicalNode.Optimize, PhysicalNode.Path, PhysicalNode.Pivot, PhysicalNode.Project, PhysicalNode.PushedScan, PhysicalNode.RecursiveRef, PhysicalNode.Rename, PhysicalNode.ReservoirSample, PhysicalNode.Scan, PhysicalNode.Select, PhysicalNode.Sessionize, PhysicalNode.SetKind, PhysicalNode.SetOp, PhysicalNode.Solve, PhysicalNode.Sort, PhysicalNode.Spool, PhysicalNode.TopK, PhysicalNode.Trace, PhysicalNode.Tree, PhysicalNode.Universal, PhysicalNode.Unnest, PhysicalNode.Unpivot, PhysicalNode.Why, PhysicalNode.Window -
Constructor Summary
ConstructorsConstructorDescriptionIntervalJoin(Schema schema, AllenRelation relation, int leftStartIdx, int leftEndIdx, int rightStartIdx, int rightEndIdx, boolean merge, PhysicalNode left, PhysicalNode right) Creates an instance of aIntervalJoinrecord class.IntervalJoin(Schema schema, AllenRelation relation, int leftStartIdx, int leftEndIdx, int rightStartIdx, int rightEndIdx, PhysicalNode left, PhysicalNode right) Convenience constructor for the default (non-merge) plane-sweep variant. -
Method Summary
Modifier and TypeMethodDescriptionchildren()Direct child plans, left-to-right; empty for aPhysicalNode.Scan.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.left()Returns the value of theleftrecord component.intReturns the value of theleftEndIdxrecord component.intReturns the value of theleftStartIdxrecord component.booleanmerge()Returns the value of themergerecord component.relation()Returns the value of therelationrecord component.right()Returns the value of therightrecord component.intReturns the value of therightEndIdxrecord component.intReturns the value of therightStartIdxrecord component.schema()Returns the value of theschemarecord 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.plan.PhysicalNode
deliveredOrdering, mapChildren
-
Constructor Details
-
IntervalJoin
public IntervalJoin(Schema schema, AllenRelation relation, int leftStartIdx, int leftEndIdx, int rightStartIdx, int rightEndIdx, PhysicalNode left, PhysicalNode right) Convenience constructor for the default (non-merge) plane-sweep variant. -
IntervalJoin
public IntervalJoin(Schema schema, AllenRelation relation, int leftStartIdx, int leftEndIdx, int rightStartIdx, int rightEndIdx, boolean merge, PhysicalNode left, PhysicalNode right) Creates an instance of aIntervalJoinrecord class.- Parameters:
schema- the value for theschemarecord componentrelation- the value for therelationrecord componentleftStartIdx- the value for theleftStartIdxrecord componentleftEndIdx- the value for theleftEndIdxrecord componentrightStartIdx- the value for therightStartIdxrecord componentrightEndIdx- the value for therightEndIdxrecord componentmerge- the value for themergerecord componentleft- the value for theleftrecord componentright- the value for therightrecord component
-
-
Method Details
-
children
Description copied from interface:PhysicalNodeDirect child plans, left-to-right; empty for aPhysicalNode.Scan.- Specified by:
childrenin interfacePhysicalNode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
schema
Returns the value of theschemarecord component.- Specified by:
schemain interfacePhysicalNode- Returns:
- the value of the
schemarecord component
-
relation
Returns the value of therelationrecord component.- Returns:
- the value of the
relationrecord component
-
leftStartIdx
public int leftStartIdx()Returns the value of theleftStartIdxrecord component.- Returns:
- the value of the
leftStartIdxrecord component
-
leftEndIdx
public int leftEndIdx()Returns the value of theleftEndIdxrecord component.- Returns:
- the value of the
leftEndIdxrecord component
-
rightStartIdx
public int rightStartIdx()Returns the value of therightStartIdxrecord component.- Returns:
- the value of the
rightStartIdxrecord component
-
rightEndIdx
public int rightEndIdx()Returns the value of therightEndIdxrecord component.- Returns:
- the value of the
rightEndIdxrecord component
-
merge
public boolean merge()Returns the value of themergerecord component.- Returns:
- the value of the
mergerecord component
-
left
Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
right
Returns the value of therightrecord component.- Returns:
- the value of the
rightrecord component
-