laurentgo commented on a change in pull request #1311: CALCITE-3187: Make
decimal type inference overridable.
URL: https://github.com/apache/calcite/pull/1311#discussion_r301869988
##########
File path:
core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactory.java
##########
@@ -308,6 +308,29 @@ RelDataType createDecimalQuotient(
@SuppressWarnings("deprecation")
FieldInfoBuilder builder();
+ /**
+ * Infers the return type of a decimal addition. Decimal addition involves
+ * at least one decimal operand and requires both operands to have exact
+ * numeric types.
+ *
+ * @param type1 type of the first operand
+ * @param type2 type of the second operand
+ * @return the result type for a decimal addition, or null if decimal
+ * addition should not be applied to the operands.
+ */
+ RelDataType createDecimalAddition(RelDataType type1, RelDataType type2);
Review comment:
should it be a default method to preserve source compatibility?
----------------------------------------------------------------
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