Record Class PhysicalNode.Path

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

public static record PhysicalNode.Path(Schema schema, String fromColumn, String toColumn, boolean undirected, int minHops, int maxHops, String depthColumn, Optional<Operand> boundSource, Optional<Operand> boundTarget, PhysicalNode input) extends Record implements PhysicalNode
Bounded variable-length path reachability (PATH) over the input edge relation, read over fromColumn()/toColumn() as directed edges, or as undirected ones when undirected(). Emits one row (from, to, depth) for every pair connected by a directed path whose length lies within [minHops, maxHops], where depth is the shortest such length (depthColumn(), a NUMBER). Evaluated in-engine by a bounded breadth-first traversal; never pushed to a source.

boundSource() / boundTarget() carry the endpoint bounds the optimizer folds in (PATH-001): a present boundSource seeds the traversal at that literal instead of at every node, a present boundTarget searches the reversed adjacency from it, and both present is a single-pair search. The distance is unaffected — the shortest path from a seed does not depend on which other seeds were present — so the bounded result is a slice of the unbounded one.

  • Constructor Details

    • Path

      public Path(Schema schema, String fromColumn, String toColumn, boolean undirected, int minHops, int maxHops, String depthColumn, PhysicalNode input)
      Unbounded path (no endpoint pushdown) — both bounds empty.
    • Path

      public Path(Schema schema, String fromColumn, String toColumn, boolean undirected, int minHops, int maxHops, String depthColumn, Optional<Operand> boundSource, Optional<Operand> boundTarget, PhysicalNode input)
      Creates an instance of a Path 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
      minHops - the value for the minHops record component
      maxHops - the value for the maxHops record component
      depthColumn - the value for the depthColumn 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
    • minHops

      public int minHops()
      Returns the value of the minHops record component.
      Returns:
      the value of the minHops record component
    • maxHops

      public int maxHops()
      Returns the value of the maxHops record component.
      Returns:
      the value of the maxHops record component
    • depthColumn

      public String depthColumn()
      Returns the value of the depthColumn record component.
      Returns:
      the value of the depthColumn 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