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

    https://github.com/apache/spark/pull/13096#discussion_r63152997
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
 ---
    @@ -1560,7 +1561,15 @@ object EmbedSerializerInFilter extends 
Rule[LogicalPlan] {
             val newCondition = condition transform {
               case a: Attribute if a == d.output.head => d.deserializer
             }
    -        Filter(newCondition, d.child)
    +        val filter = Filter(newCondition, d.child)
    +
    +        // Adds an extra Project here, to preserve the output expr id of 
`SerializeFromObject`.
    +        // We will remove it later in RemoveAliasOnlyProject rule.
    +        val objAttrs = filter.output.zip(s.output).map {
    +          case (fout, sout) =>
    +            Alias(fout, fout.name)(exprId = sout.exprId)
    --- End diff --
    
    (it seems putting the case in the same line is preferred (`foreach { case 
(name, _) =>`) 
[scala-style-guide#pattern-matching](https://github.com/databricks/scala-style-guide#pattern-matching))


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