DonnyZone opened a new pull request #1381: [CALCITE-3245] CompileException in Janino when a query contains a division between a Double and a BigDecimal URL: https://github.com/apache/calcite/pull/1381 This PR is proposed to handle the exception caused by Java `BigDecimal` type in [CALCITE-3245](https://issues.apache.org/jira/browse/CALCITE-3245). (1) Implement `getPrecision` and `getScale` in JavaType. As BigDecimal will trigger the computation on precision and scale (`deriveDecimalPlusType` , `deriveDecimalMultiplyType` in `RelDataTypeSystem`), but the default `PRECISION_NOT_SPECIFIED` and `SCALE_NOT_SPECIFIED` value will cause the assertions. (2) Specially handle cast on `BigDecimal.class`. Current now, there are more than one implementations for data type conversion, such as **`Types.castIfNecessary`**, `**RexToLixTranslator.convert**`, **`RexToLixTranslator.translateCast, and etc`**. We need to unify them later.
---------------------------------------------------------------- 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