File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
sql/core/src/test/scala/org/apache/spark/sql Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -795,21 +795,19 @@ class SQLQuerySuite extends QueryTest with BeforeAndAfterAll {
795795
796796 test(" throw errors for non-aggregate attributes with aggregation" ) {
797797 def checkAggregation (query : String , isInvalidQuery : Boolean = true ) {
798- val logicalPlan = sql(query).queryExecution.logical
799-
800798 if (isInvalidQuery) {
801799 val e = intercept[TreeNodeException [LogicalPlan ]](sql(query).queryExecution.analyzed)
802800 assert(
803801 e.getMessage.startsWith(" Expression not in GROUP BY" ),
804- " Non-aggregate attribute(s) not detected\n " + logicalPlan )
802+ " Non-aggregate attribute(s) not detected\n " )
805803 } else {
806804 // Should not throw
807805 sql(query).queryExecution.analyzed
808806 }
809807 }
810808
811809 checkAggregation(" SELECT key, COUNT(*) FROM testData" )
812- checkAggregation(" SELECT COUNT(key), COUNT(*) FROM testData" , false )
810+ checkAggregation(" SELECT COUNT(key), COUNT(*) FROM testData" , isInvalidQuery = false )
813811
814812 checkAggregation(" SELECT value, COUNT(*) FROM testData GROUP BY key" )
815813 checkAggregation(" SELECT COUNT(value), SUM(key) FROM testData GROUP BY key" , false )
You can’t perform that action at this time.
0 commit comments