danny0405 commented on a change in pull request #706: [CALCITE-2302] Implicit
type cast support
URL: https://github.com/apache/calcite/pull/706#discussion_r310425911
##########
File path: core/src/main/java/org/apache/calcite/sql/SqlKind.java
##########
@@ -1279,6 +1279,46 @@
LESS_THAN, GREATER_THAN,
GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL);
+ /**
+ * Category of binary arithmetic.
+ *
+ * <p>Consists of:
+ * {@link #PLUS}
+ * {@link #MINUS}
+ * {@link #TIMES}
+ * {@link #DIVIDE}
+ * {@link #MOD}.
+ */
+ public static final Set<SqlKind> BINARY_ARITHMETIC =
+ EnumSet.of(PLUS, MINUS, TIMES, DIVIDE, MOD);
+
+ /**
+ * Category of binary equality.
+ *
+ * <p>Consists of:
+ * {@link #EQUALS}
+ * {@link #NOT_EQUALS}
+ */
+ public static final Set<SqlKind> BINARY_EQUALITY =
+ EnumSet.of(EQUALS, NOT_EQUALS);
+
+ /**
+ * Category of binary comparison.
+ *
+ * <p>Consists of:
+ * {@link #EQUALS}
+ * {@link #NOT_EQUALS}
+ * {@link #GREATER_THAN}
+ * {@link #GREATER_THAN_OR_EQUAL}
+ * {@link #LESS_THAN}
+ * {@link #LESS_THAN_OR_EQUAL}
+ */
+ public static final Set<SqlKind> BINARY_COMPARISON =
+ EnumSet.of(
+ EQUALS, NOT_EQUALS,
+ GREATER_THAN, GREATER_THAN_OR_EQUAL,
+ LESS_THAN, LESS_THAN_OR_EQUAL);
Review comment:
But i need to make sure if the implicit type coercion behaviors for them are
the same.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services