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

    https://github.com/apache/spark/pull/5659#discussion_r30264341
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ---
    @@ -431,31 +459,31 @@ class Analyzer(
             ordering: Seq[SortOrder],
             child: LogicalPlan,
             grandchild: LogicalPlan): (Seq[SortOrder], Seq[Attribute]) = {
    -      // Find any attributes that remain unresolved in the sort.
    -      val unresolved: Seq[Seq[String]] =
    -        ordering.flatMap(_.collect { case UnresolvedAttribute(nameParts) 
=> nameParts })
     
    -      // Create a map from name, to resolved attributes, when the desired 
name can be found
    -      // prior to the projection.
    -      val resolved: Map[Seq[String], NamedExpression] =
    -        unresolved.flatMap(u => grandchild.resolve(u, resolver).map(a => u 
-> a)).toMap
    +      // Store `SortOrder`s we resolved based on grandchild
    +      val resolved = scala.collection.mutable.ListBuffer.empty[Expression]
    +
    +      val resolvedOrdering = ordering.map { order =>
    --- End diff --
    
    can this just be a map without the mutable list buffer?  again, i'm not 
really worried about performance here.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to