Github user gatorsmile commented on the pull request:

    https://github.com/apache/spark/pull/11555#issuecomment-193137731
  
    So far, the test cases I wrote are listed below. I think we still need to 
add more to cover all the cases. 
    ```
      test("window basic") {
        checkHiveQl(
          s"""
             |select key, value,
             |round(avg(value) over (), 2)
             |from parquet_t1 order by key
          """.stripMargin)
      }
    
      test("window with different window specification") {
        checkHiveQl(
          s"""
             |select key, value,
             |dense_rank() over (order by key, value) as dr,
             |sum(value) over (partition by key order by key) as sum
             |from parquet_t1
          """.stripMargin)
      }
    
      test("window with the same window specification with aggregate + having") 
{
        checkHiveQl(
          s"""
            |select key, value,
            |sum(value) over (partition by key % 5 order by key) as dr
            |from parquet_t1 group by key, value having key > 5
          """.stripMargin)
      }
    
      test("window with the same window specification with aggregate 
functions") {
        checkHiveQl(
          s"""
            |select key, value,
            |sum(value) over (partition by key % 5 order by key) as dr
            |from parquet_t1 group by key, value
          """.stripMargin)
      }
    
      test("window with the same window specification with aggregate") {
        checkHiveQl(
          s"""
            |select key, value,
            |dense_rank() over (distribute by key sort by key, value) as dr,
            |count(key)
            |from parquet_t1 group by key, value
          """.stripMargin)
      }
    
      test("window with the same window specification without aggregate and 
filter") {
        checkHiveQl(
          s"""
            |select key, value,
            |dense_rank() over (distribute by key sort by key, value) as dr,
            |count(key) over(distribute by key sort by key, value) as ca
            |from parquet_t1
          """.stripMargin)
      }
    ```


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