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

    https://github.com/apache/spark/pull/17100#discussion_r146257154
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala
 ---
    @@ -408,16 +408,23 @@ class AnalysisErrorSuite extends AnalysisTest {
         // CheckAnalysis should throw AnalysisException when Aggregate 
contains missing attribute(s)
         // Since we manually construct the logical plan at here and Sum only 
accept
         // LongType, DoubleType, and DecimalType. We use LongType as the type 
of a.
    -    val plan =
    -      Aggregate(
    +    val attrA = AttributeReference("a", LongType)(exprId = ExprId(1))
    +    val otherA = AttributeReference("a", LongType)(exprId = ExprId(2))
    +    val bAlias = Alias(sum(attrA), "b")() :: Nil
    +    val plan = Aggregate(
    --- End diff --
    
    we can make the test case more strong by adding another attribute `c` which 
is missing from input but doesn't have the same name in input.


---

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

Reply via email to