abstract class TreeNode[BaseType <: TreeNode[BaseType]] extends Product {
self: BaseType =>
// ...
}
TreeNode — Node in Catalyst Tree
TreeNode
is a node in Catalyst tree with zero or more children (and can build expression or structured query plan trees).
TreeNode
offers not only functions that you may have used from Scala Collection API, e.g. map
, flatMap
, collect
, collectFirst
, foreach
, but also mapChildren
, transform
, transformDown
, transformUp
, foreachUp
, numberedTreeString
, p
, asCode
, prettyJson
, etc. that are particularly useful for tree manipulation or debugging.
Note
|
Scala-specific, TreeNode is an abstract class that is the base class of Expression and Catalyst’s QueryPlan abstract classes.
|
Tip
|
|
TreeNode Contract
package org.apache.spark.sql.catalyst.trees
abstract class TreeNode[BaseType <: TreeNode[BaseType]] extends Product {
self: BaseType =>
// only required methods that have no implementation
def children: Seq[BaseType]
def verboseString: String
}
Method | Description |
---|---|
withNewChildren
Method
Caution
|
FIXME |