xuzifu666 commented on code in PR #5078:
URL: https://github.com/apache/calcite/pull/5078#discussion_r3524206091


##########
babel/src/test/resources/sql/within-group-over.iq:
##########
@@ -0,0 +1,93 @@
+# within-group-over.iq - WITHIN GROUP (ORDER BY) OVER (PARTITION BY)
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Tests for the non-standard (Oracle) syntax that lets an aggregate function
+# with a "WITHIN GROUP (ORDER BY ...)" sort key also carry an "OVER (...)"
+# clause, so that it behaves as an analytic (window) function. The WITHIN GROUP
+# order key orders the aggregate's input but does not restrict the window 
frame:
+# the aggregate is computed over the whole partition and broadcast to every row
+# (matching Oracle). This syntax is enabled by the BABEL conformance
+# (SqlConformance.allowWithinGroupOverAggregate).
+#
+!use scott-babel
+!set outputformat mysql
+
+# The following 3 tests are related to this issue.

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



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to