[CALCITE-6036] Support WITHIN GROUP(ORDER BY x) OVER (PARTITION BY y) - #5078
Conversation
| !use scott-babel | ||
| !set outputformat mysql | ||
|
|
||
| # The following 3 tests are related to this issue. |
There was a problem hiding this comment.
Since Enumerable does not currently support the PERCENTILE_CONT/PERCENTILE_DISC function, I did not use the function provided in the JIRA ticket; instead, I use listagg function to test.
Validated in oracle: https://onecompiler.com/oracle/44tzw78rb and result is as expected.
| * WITHIN GROUP clause with an OVER clause is non-standard (Oracle) syntax that | ||
| * is only allowed under a conformance that enables it, such as BABEL. */ | ||
| @Test void testPercentileWithinGroupOver() { | ||
| final String sql = "select\n" |
There was a problem hiding this comment.
would be great also having tests for unparsing especially if there is expression under order by /partition by
There was a problem hiding this comment.
OK, I had a test for unparsing, PTAL
|
Could you help to take a look for it again? I'm not sure whether you are happy with these changes, thanks~ @snuyanzin |
|
thanks for addressing the feedback |
|
Thanks for your review @snuyanzin and this PR has been open for a few days; if there are no further comments, I will merge it in the coming days. |
|



jira: https://issues.apache.org/jira/browse/CALCITE-6036