You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "MasseGuillaume (via GitHub)" <gi...@apache.org> on 2023/06/01 16:50:02 UTC

[GitHub] [calcite] MasseGuillaume commented on a diff in pull request #3236: [CALCITE-5738] Add SORT_ARRAY function (enabled in Spark library)

MasseGuillaume commented on code in PR #3236:
URL: https://github.com/apache/calcite/pull/3236#discussion_r1213430245


##########
core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java:
##########
@@ -3061,6 +3063,28 @@ private static class ReinterpretImplementor extends AbstractRexCallImplementor {
     }
   }
 
+  /** Implementor for sort_array. */
+  private static class SortArrayImplementor extends AbstractRexCallImplementor {
+    SortArrayImplementor() {
+      super("sort_array", NullPolicy.STRICT, false);
+    }
+
+    @Override Expression implementSafe(RexToLixTranslator translator,
+        RexCall call, List<Expression> argValueList) {
+      if (argValueList.size() == 2) {
+        return Expressions.call(
+            BuiltInMethod.SORT_ARRAY.method,
+            argValueList.get(0),

Review Comment:
   https://github.com/apache/calcite/pull/3236/files#diff-23301236e7a9c0e772620a2093cce6a979d7703c511f2417973fae0b26ee62b3R3891
   
   ```
   list: argValueList.get(0)
   ordering: argValueList.get(1) 
   ```



-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org