TreeNode

TreeNode is the foundation of Catalyst.

Scala-specific, TreeNode is an abstract class that is the base class of QueryPlan and Expression abstract classes.

Tip
TreeNode abstract type is a quite advanced Scala type definition (at least comparing to the other Scala types in Spark) so understanding its behaviour even outside Spark might be worthwhile by itself.
abstract class TreeNode[BaseType <: TreeNode[BaseType]] extends Product {
  self: BaseType =>

  // ...
}

TreeNode can have children and offers not only functions that you may have used from Scala Collection API, e.g. foreach, map, flatMap, collect, collectFirst, but also foreachUp, mapChildren, transform, transformDown, transformUp, etc. that are particularly useful for tree manipulation.

children Method

Caution
FIXME

results matching ""

    No results matching ""