Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1795#discussion_r15853395
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala
 ---
    @@ -89,15 +102,15 @@ abstract class LogicalPlan extends 
QueryPlan[LogicalPlan] {
         }
     
         options.distinct match {
    -      case (a, Nil) :: Nil => Some(a) // One match, no nested fields, use 
it.
    +      case Seq((a, Nil)) => Some(a) // One match, no nested fields, use it.
           // One match, but we also need to extract the requested nested field.
    -      case (a, nestedFields) :: Nil =>
    +      case Seq((a, nestedFields)) =>
             a.dataType match {
               case StructType(fields) =>
                 Some(Alias(nestedFields.foldLeft(a: Expression)(GetField), 
nestedFields.last)())
               case _ => None // Don't know how to resolve these field 
references
             }
    -      case Nil => None         // No matches.
    +      case Seq() => None         // No matches.
    --- End diff --
    
    Is the same thing for `Nil` and `Seq()`?


---
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