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

    https://github.com/apache/spark/pull/10620#discussion_r49259620
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala 
---
    @@ -936,6 +936,35 @@ class SQLQuerySuite extends QueryTest with 
SQLTestUtils with TestHiveSingleton {
         assert(e.getMessage.contains("Distinct window functions are not 
supported"))
       }
     
    +  test("window function: better support of parentheses") {
    +    val data = Seq(
    +      WindowData(1, "a", 5),
    +      WindowData(2, "a", 6),
    +      WindowData(3, "b", 7),
    +      WindowData(4, "b", 8),
    +      WindowData(5, "c", 9),
    +      WindowData(6, "c", 10)
    +    )
    +    sparkContext.parallelize(data).toDF().registerTempTable("windowData")
    +
    +    checkAnswer(
    +      sql(
    +        """
    +          |select month, area, product,
    +          |sum(product + 1) over (partition by ((1) + (1 - 1) -
    +          |(2 * 1 / 2) + (1) + product - (product)) order by 2)
    --- End diff --
    
    Putting this query into the test is because we want to make sure some 
corner cases passed. E.g., (expression) op (expression op expression). I will 
try simpler ones.


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