Record Class PhysicalNode.Closure

java.lang.Object
java.lang.Record
com.darkcollective.relix.plan.PhysicalNode.Closure
All Implemented Interfaces:
PhysicalNode
Enclosing interface:
PhysicalNode

public static record PhysicalNode.Closure(Schema schema, String fromColumn, String toColumn, boolean undirected, boolean reflexive, Optional<Operand> boundSource, Optional<Operand> boundTarget, PhysicalNode input) extends Record implements PhysicalNode
Transitive closure (least fixpoint) of the input edge relation over fromColumn()/toColumn(). reflexive() selects R* (adds identity pairs) over R⁺. Evaluated in-engine by an iterative fixpoint under set semantics; never pushed to a source.

boundSource() / boundTarget() are the optional constant endpoint bounds folded in by the optimizer (CLOSURE-001): a present boundSource runs single-source reachability seeded from that literal, a present boundTarget runs single-target reachability over the reversed adjacency, and both present is a single-pair check. Each is a literal Operand; the output schema is unchanged.

  • Constructor Details

    • Closure

      public Closure(Schema schema, String fromColumn, String toColumn, boolean undirected, boolean reflexive, PhysicalNode input)
      Unbounded closure (no endpoint pushdown) — both bounds empty.
    • Closure

      public Closure(Schema schema, String fromColumn, String toColumn, boolean undirected, boolean reflexive, Optional<Operand> boundSource, Optional<Operand> boundTarget, PhysicalNode input)
      Creates an instance of a Closure record class.
      Parameters:
      schema - the value for the schema record component
      fromColumn - the value for the fromColumn record component
      toColumn - the value for the toColumn record component
      undirected - the value for the undirected record component
      reflexive - the value for the reflexive record component
      boundSource - the value for the boundSource record component
      boundTarget - the value for the boundTarget record component
      input - the value for the input record component
  • Method Details

    • children

      public List<PhysicalNode> children()
      Description copied from interface: PhysicalNode
      Direct child plans, left-to-right; empty for a PhysicalNode.Scan.
      Specified by:
      children in interface PhysicalNode
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • schema

      public Schema schema()
      Returns the value of the schema record component.
      Specified by:
      schema in interface PhysicalNode
      Returns:
      the value of the schema record component
    • fromColumn

      public String fromColumn()
      Returns the value of the fromColumn record component.
      Returns:
      the value of the fromColumn record component
    • toColumn

      public String toColumn()
      Returns the value of the toColumn record component.
      Returns:
      the value of the toColumn record component
    • undirected

      public boolean undirected()
      Returns the value of the undirected record component.
      Returns:
      the value of the undirected record component
    • reflexive

      public boolean reflexive()
      Returns the value of the reflexive record component.
      Returns:
      the value of the reflexive record component
    • boundSource

      public Optional<Operand> boundSource()
      Returns the value of the boundSource record component.
      Returns:
      the value of the boundSource record component
    • boundTarget

      public Optional<Operand> boundTarget()
      Returns the value of the boundTarget record component.
      Returns:
      the value of the boundTarget record component
    • input

      public PhysicalNode input()
      Returns the value of the input record component.
      Returns:
      the value of the input record component