Github user MickDavies commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6673#discussion_r32294499
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala 
---
    @@ -62,6 +62,8 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]] {
       /** Returns a Seq of the children of this node */
       def children: Seq[BaseType]
     
    +  lazy val childrenSet:Set[TreeNode[_]] = children.toSet
    --- End diff --
    
    Good idea.
    
    Thanks
    
    Mick
    
    > On 12 Jun 2015, at 05:34, Wenchen Fan <notificati...@github.com> wrote:
    > 
    > In 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala 
<https://github.com/apache/spark/pull/6673#discussion_r32289725>:
    > 
    > > @@ -62,6 +62,8 @@ abstract class TreeNode[BaseType <: 
TreeNode[BaseType]] {
    > >    /** Returns a Seq of the children of this node */
    > >    def children: Seq[BaseType]
    > >  
    > > +  lazy val childrenSet:Set[TreeNode[_]] = children.toSet
    > how about naming it containsChild so that we can use it like 
containsChild(arg)?
    > 
    > —
    > Reply to this email directly or view it on GitHub 
<https://github.com/apache/spark/pull/6673/files#r32289725>.
    > 
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to