DonnyZone commented on a change in pull request #1859: [CALCITE-3863] Make Truncate/Round return type inference overridable through rel data … URL: https://github.com/apache/calcite/pull/1859#discussion_r397681534
########## File path: core/src/main/java/org/apache/calcite/rel/type/RelDataTypeSystem.java ########## @@ -405,4 +405,92 @@ default RelDataType deriveDecimalModType(RelDataTypeFactory typeFactory, return null; } + /** + * Infers the return type of a decimal truncate operation. Decimal truncate + * involves at least one decimal operand. + * + * <p>The default implementation is SQL:2003 compliant: the declared type of + * the result is the declared type of the first operand (decimal to be truncated). + * + * @see Glossary#SQL2003 SQL:2003 Part 2 Section 6.27 Review comment: I know SQL standard document the general operators (`+`, `-`, `*`, `/`, `%`) for decimal types. But can we find the guideline in SQL standard for `truncate` and `round`? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services