danny0405 commented on a change in 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#discussion_r314282354
##########
File path:
core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactoryImpl.java
##########
@@ -546,6 +546,33 @@ public boolean isNullable() {
return nullable;
}
+ public int getPrecision() {
+ final SqlTypeName typeName =
+ JavaToSqlTypeConversionRules.instance().lookup(clazz);
+ if (typeName != null) {
+ return typeSystem.getDefaultPrecision(typeName);
+ }
+ return PRECISION_NOT_SPECIFIED;
+ }
+
+ public int getScale() {
+ final SqlTypeName typeName =
Review comment:
Why add these 2 methods ? Where they are used ?
----------------------------------------------------------------
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