Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20687#discussion_r171328520
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/complexTypesSuite.scala
 ---
    @@ -331,4 +331,24 @@ class ComplexTypesSuite extends PlanTest with 
ExpressionEvalHelper {
           .analyze
         comparePlans(Optimizer execute rel, expected)
       }
    +
    +  test("SPARK-23500: Simplify complex ops that aren't at the plan root") {
    +    val structRel = relation
    +      .select(GetStructField(CreateNamedStruct(Seq("att1", 'id)), 0, None) 
as "foo")
    +      .select('foo).analyze
    --- End diff --
    
    @henryr Could you update the test cases properly? Actually, this will not 
provide the test coverage of your PR properly because of `CollapseProject` at 
line 40.


---

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

Reply via email to