rubenada commented on code in PR #4607:
URL: https://github.com/apache/calcite/pull/4607#discussion_r2470227778


##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -13654,7 +13654,7 @@ private static void 
checkArrayConcatAggFuncFails(SqlOperatorFixture t) {
         + "where x > 1 order by x asc limit 1)",
         "(INTEGER NOT NULL, INTEGER NOT NULL) MAP NOT NULL", "{3=4}");
     f.check("select map(select x,y from (values(1,2),(3,4)) as t(x,y) order by 
x desc)",
-        "(INTEGER NOT NULL, INTEGER NOT NULL) MAP NOT NULL", "{1=2, 3=4}");
+        "(INTEGER NOT NULL, INTEGER NOT NULL) MAP NOT NULL", "{3=4, 1=2}");

Review Comment:
   Basically I applied the patch not only to array creation, but also to map 
and multiset, which "fixed" this test: notice how the subquery contains an 
`order by x desc` which was previously ignored, but now it is respected, so we 
get the sorted result (in descending order by the first element) `{3=4, 1=2}`



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