Class IrPathNode

java.lang.Object
io.trino.json.ir.IrPathNode
Direct Known Subclasses:
IrAccessor, IrArithmeticBinary, IrArithmeticUnary, IrConstantJsonSequence, IrContextVariable, IrJsonNull, IrLastIndexVariable, IrLiteral, IrNamedJsonVariable, IrNamedValueVariable, IrPredicate, IrPredicateCurrentItemVariable

public abstract class IrPathNode extends Object
  • Constructor Details

  • Method Details

    • accept

      protected <R, C> R accept(IrJsonPathVisitor<R,C> visitor, C context)
    • getType

      public final Optional<Type> getType()
      Get the result type, whenever known. Type might be known for IrPathNodes returning a singleton sequence (e.g. IrArithmeticBinary), as well as for IrPathNodes returning a sequence of arbitrary length (e.g. IrSizeMethod). If the node potentially returns a non-singleton sequence, this method shall return Type only if the type is the same for all elements of the sequence. NOTE: Type is not applicable to every IrPathNode. If the IrPathNode produces an empty sequence, a JSON null, or a sequence containing non-literal JSON items, Type cannot be determined.
    • equals

      public abstract boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public abstract int hashCode()
      Overrides:
      hashCode in class Object