org.apache.spark.sql.catalyst.trees

TreeNode

abstract class TreeNode[BaseType <: TreeNode[BaseType]] extends Product

Self Type
BaseType
Linear Supertypes
Product, Equals, AnyRef, Any
Known Subclasses
Abs, Acos, Add, AddMonths, Aggregate, AggregateFunction, Alias, And, AppendColumns, ArrayContains, Ascii, Asin, AssertNotNull, AtLeastNNonNulls, Atan, Atan2, Attribute, AttributeReference, Average, Base64, Bin, BinaryArithmetic, BinaryComparison, BinaryExpression, BinaryMathExpression, BinaryNode, BinaryOperator, BitwiseAnd, BitwiseNot, BitwiseOr, BitwiseXor, BoundReference, BroadcastHint, CaseKeyWhen, CaseWhen, CaseWhenLike, Cast, Cbrt, Ceil, CentralMomentAgg, CheckOverflow, CoGroup, Coalesce, CodegenFallback, Concat, ConcatWs, Contains, Conv, Corr, Cos, Cosh, Count, Crc32, CreateArray, CreateExternalRow, CreateNamedStruct, CreateNamedStructUnsafe, CreateStruct, CreateStructUnsafe, Cube, CurrentDate, CurrentTimestamp, DateAdd, DateDiff, DateFormatClass, DateSub, DayOfMonth, DayOfYear, DeclarativeAggregate, Decode, DecodeUsingSerializer, Distinct, Divide, Encode, EncodeUsingSerializer, EndsWith, EqualNullSafe, EqualTo, EulerNumber, Except, Exists, Exp, Expand, ExpectsInputTypes, Explode, Expm1, Expression, Factorial, Filter, FindInSet, First, Floor, FormatNumber, FormatString, FromUTCTimestamp, FromUnixTime, Generate, Generator, GetArrayItem, GetArrayStructFields, GetJsonObject, GetMapValue, GetStructField, GreaterThan, GreaterThanOrEqual, Greatest, GroupingAnalytics, GroupingSets, HashPartitioning, Hex, Hour, HyperLogLogPlusPlus, Hypot, If, ImperativeAggregate, ImplicitCastInputTypes, In, InSet, InSubquery, InitCap, InitializeJavaBean, InputFileName, InsertIntoTable, Intersect, Invoke, IsNaN, IsNotNull, IsNull, Join, JsonTuple, Kurtosis, LambdaVariable, Last, LastDay, LeafExpression, LeafMathExpression, LeafNode, Least, Length, LessThan, LessThanOrEqual, Levenshtein, Like, Limit, Literal, LocalRelation, Log, Log10, Log1p, Log2, Logarithm, LogicalPlan, Lower, MakeDecimal, MapGroups, MapObjects, MapPartitions, Max, MaxOf, Md5, Min, MinOf, Minute, Month, MonthsBetween, MultiAlias, Multiply, MutableLiteral, NaNvl, NamedExpression, NewInstance, NextDay, Nondeterministic, Not, OneRowRelation, Or, OrderlessHashPartitioning, PartitioningCollection, Pi, Pivot, Pmod, Pow, Predicate, PrettyAttribute, Project, PromotePrecision, Quarter, QueryPlan, RDG, RLike, Rand, Randn, RangePartitioning, RedistributeData, RegExpExtract, RegExpReplace, Remainder, Repartition, RepartitionByExpression, ResolvedStar, Rint, Rollup, Round, Sample, ScalaUDF, ScriptTransformation, Second, SetOperation, Sha1, Sha2, ShiftLeft, ShiftRight, ShiftRightUnsigned, Signum, Sin, Sinh, Size, Skewness, Sort, SortArray, SortOrder, SortPartitions, SortPrefix, SoundEx, Sqrt, Star, StartsWith, StaticInvoke, StddevPop, StddevSamp, String2StringExpression, StringInstr, StringLPad, StringLocate, StringPredicate, StringRPad, StringRegexExpression, StringRepeat, StringReverse, StringSpace, StringSplit, StringTranslate, StringTrim, StringTrimLeft, StringTrimRight, SubQueryExpression, Subquery, Substring, SubstringIndex, Subtract, Sum, Tan, Tanh, TernaryExpression, TimeAdd, TimeSub, ToDate, ToDegrees, ToRadians, ToUTCTimestamp, ToUnixTimestamp, TruncDate, UnBase64, UnaryExpression, UnaryLogExpression, UnaryMathExpression, UnaryMinus, UnaryNode, UnaryPositive, Unevaluable, Unhex, Union, UnixTime, UnixTimestamp, UnresolvedAlias, UnresolvedAttribute, UnresolvedExtractValue, UnresolvedFunction, UnresolvedRelation, UnresolvedStar, UnresolvedWindowExpression, UnresolvedWindowFunction, UnscaledValue, UnwrapOption, UpCast, Upper, UserDefinedGenerator, VariancePop, VarianceSamp, WeekOfYear, Window, WindowExpression, WindowFunction, WindowSpecDefinition, With, WithWindowDefinition, WrapOption, Year
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TreeNode
  2. Product
  3. Equals
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TreeNode()

Abstract Value Members

  1. abstract def canEqual(that: Any): Boolean

    Definition Classes
    Equals
  2. abstract def children: Seq[BaseType]

    Returns a Seq of the children of this node.

    Returns a Seq of the children of this node. Children should not change. Immutability required for containsChild optimization

  3. abstract def productArity: Int

    Definition Classes
    Product
  4. abstract def productElement(n: Int): Any

    Definition Classes
    Product

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def apply(number: Int): BaseType

    Returns the tree node at the specified number.

    Returns the tree node at the specified number. Numbers for each node can be found in the numberedTreeString.

  7. def argString: String

    Returns a string representing the arguments to this node, minus any children

  8. def asCode: String

    Returns a 'scala code' representation of this TreeNode and its children.

    Returns a 'scala code' representation of this TreeNode and its children. Intended for use when debugging where the prettier toString function is obfuscating the actual structure. In the case of 'pure' TreeNodes that only contain primitives and other TreeNodes, the result can be pasted in the REPL to build an equivalent Tree.

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def collect[B](pf: PartialFunction[BaseType, B]): Seq[B]

    Returns a Seq containing the result of applying a partial function to all elements in this tree on which the function is defined.

  12. def collectFirst[B](pf: PartialFunction[BaseType, B]): Option[B]

    Finds and returns the first TreeNode of the tree for which the given partial function is defined (pre-order), and applies the partial function to it.

  13. lazy val containsChild: Set[TreeNode[_]]

  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  16. def fastEquals(other: TreeNode[_]): Boolean

    Faster version of equality which short-circuits when two treeNodes are the same instance.

    Faster version of equality which short-circuits when two treeNodes are the same instance. We don't just override Object.equals, as doing so prevents the scala compiler from generating case class equals methods

  17. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def find(f: (BaseType) ⇒ Boolean): Option[BaseType]

    Find the first TreeNode that satisfies the condition specified by f.

    Find the first TreeNode that satisfies the condition specified by f. The condition is recursively applied to this node and all of its children (pre-order).

  19. def flatMap[A](f: (BaseType) ⇒ TraversableOnce[A]): Seq[A]

    Returns a Seq by applying a function to all nodes in this tree and using the elements of the resulting collections.

  20. def foreach(f: (BaseType) ⇒ Unit): Unit

    Runs the given function on this node and then recursively on children.

    Runs the given function on this node and then recursively on children.

    f

    the function to be applied to each node in the tree.

  21. def foreachUp(f: (BaseType) ⇒ Unit): Unit

    Runs the given function recursively on children then on this node.

    Runs the given function recursively on children then on this node.

    f

    the function to be applied to each node in the tree.

  22. def generateTreeString(depth: Int, lastChildren: Seq[Boolean], builder: StringBuilder): StringBuilder

    Appends the string represent of this node and its children to the given StringBuilder.

    Appends the string represent of this node and its children to the given StringBuilder.

    The i-th element in lastChildren indicates whether the ancestor of the current node at depth i + 1 is the last child of its own parent node. The depth of the root node is 0, and lastChildren for the root node should be empty.

    Attributes
    protected
  23. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  24. def getNodeNumbered(number: MutableInt): BaseType

    Attributes
    protected
  25. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  26. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  27. def jsonFields: List[(String, JValue)]

    Attributes
    protected
  28. def makeCopy(newArgs: Array[AnyRef]): BaseType

    Creates a copy of this type of tree node after a transformation.

    Creates a copy of this type of tree node after a transformation. Must be overridden by child classes that have constructor arguments that are not present in the productIterator.

    newArgs

    the new product arguments.

  29. def map[A](f: (BaseType) ⇒ A): Seq[A]

    Returns a Seq containing the result of applying the given function to each node in this tree in a preorder traversal.

    Returns a Seq containing the result of applying the given function to each node in this tree in a preorder traversal.

    f

    the function to be applied.

  30. def mapChildren(f: (BaseType) ⇒ BaseType): BaseType

    Returns a copy of this node where f has been applied to all the nodes children.

  31. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  32. def nodeName: String

    Returns the name of this type of TreeNode.

    Returns the name of this type of TreeNode. Defaults to the class name.

  33. final def notify(): Unit

    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  35. def numberedTreeString: String

    Returns a string representation of the nodes in this tree, where each operator is numbered.

    Returns a string representation of the nodes in this tree, where each operator is numbered. The numbers can be used with apply to easily access specific subtrees.

  36. val origin: Origin

  37. def otherCopyArgs: Seq[AnyRef]

    Args to the constructor that should be copied, but not transformed.

    Args to the constructor that should be copied, but not transformed. These are appended to the transformed args automatically by makeCopy

    returns

    Attributes
    protected
  38. def prettyJson: String

  39. def productIterator: Iterator[Any]

    Definition Classes
    Product
  40. def productPrefix: String

    Definition Classes
    Product
  41. def simpleString: String

    String representation of this node without any children

  42. def stringArgs: Iterator[Any]

    The arguments that should be included in the arg string.

    The arguments that should be included in the arg string. Defaults to the productIterator.

    Attributes
    protected
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  44. def toJSON: String

  45. def toString(): String

    Definition Classes
    TreeNode → AnyRef → Any
  46. def transform(rule: PartialFunction[BaseType, BaseType]): BaseType

    Returns a copy of this node where rule has been recursively applied to the tree.

    Returns a copy of this node where rule has been recursively applied to the tree. When rule does not apply to a given node it is left unchanged. Users should not expect a specific directionality. If a specific directionality is needed, transformDown or transformUp should be used.

    rule

    the function use to transform this nodes children

  47. def transformChildren(rule: PartialFunction[BaseType, BaseType], nextOperation: (BaseType, PartialFunction[BaseType, BaseType]) ⇒ BaseType): BaseType

    Returns a copy of this node where rule has been recursively applied to all the children of this node.

    Returns a copy of this node where rule has been recursively applied to all the children of this node. When rule does not apply to a given node it is left unchanged.

    rule

    the function used to transform this nodes children

    Attributes
    protected
  48. def transformDown(rule: PartialFunction[BaseType, BaseType]): BaseType

    Returns a copy of this node where rule has been recursively applied to it and all of its children (pre-order).

    Returns a copy of this node where rule has been recursively applied to it and all of its children (pre-order). When rule does not apply to a given node it is left unchanged.

    rule

    the function used to transform this nodes children

  49. def transformUp(rule: PartialFunction[BaseType, BaseType]): BaseType

    Returns a copy of this node where rule has been recursively applied first to all of its children and then itself (post-order).

    Returns a copy of this node where rule has been recursively applied first to all of its children and then itself (post-order). When rule does not apply to a given node, it is left unchanged.

    rule

    the function use to transform this nodes children

  50. def treeString: String

    Returns a string representation of the nodes in this tree

  51. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. def withNewChildren(newChildren: Seq[BaseType]): BaseType

    Returns a copy of this node with the children replaced.

    Returns a copy of this node with the children replaced. TODO: Validate somewhere (in debug mode?) that children are ordered correctly.

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped