GitHub user jiangxb1987 opened a pull request:

    https://github.com/apache/spark/pull/15417

    [SPARK-17851][SQL][MINOR][TESTS] Update invalid test sql in 
`ColumnPruningSuite`

    ## What changes were proposed in this pull request?
    
    The `originalQuery` in `ColumnPruningSuite.test("Column pruning on Window 
with useless aggregate functions")` will fail at `SimpleAnalyzer.checkAnalyze`, 
because it has expression neither presents in `group by` clause nor an 
aggregate function.
    
    ## How was this patch tested?
    Manually.
    
    Before, `SimpleAnalyzer.checkAnalyze` on this plan will fail:
    ```
    SimpleAnalyzer.checkAnalysis(originalQuery.analyze)
    org.apache.spark.sql.AnalysisException: expression '`b`' is neither present 
in the group by, nor is it an aggregate function. Add to group by or wrap in 
first() (or first_value) if you don't care which value you get.;
    ```
    After the update, this would pass checkAnalyze.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jiangxb1987/spark cptest

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/15417.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #15417
    
----
commit f9147c209791a6e073401c21cc52942c1f34723d
Author: jiangxingbo <[email protected]>
Date:   2016-10-10T08:38:47Z

    fix invalid sql.

----


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