You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/07/17 05:49:58 UTC

[GitHub] [calcite] julianhyde commented on a change in pull request #2065: [CALCITE-4073] Add a new component RexNormalize for more effect rex n…

julianhyde commented on a change in pull request #2065:
URL: https://github.com/apache/calcite/pull/2065#discussion_r456231827



##########
File path: core/src/main/java/org/apache/calcite/sql/SqlOperator.java
##########
@@ -929,6 +929,17 @@ public boolean isDeterministic() {
     return true;
   }
 
+  /**
+   * Returns whether a call to this operator is not sensitive to the operands input order.
+   * An operator is symmetrical if the call returns the same result when
+   * the operands are shuffled.
+   *
+   * <p>By default, returns true for {@link SqlKind#SYMMETRICAL}.
+   */
+  public boolean isSymmetrical() {
+    return SqlKind.SYMMETRICAL.contains(kind);

Review comment:
       I'm siding with @danny0405 on this one. His use conforms to the mathematical concept of a [symmetric function](https://en.wikipedia.org/wiki/Symmetric_function).




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

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