caicancai commented on code in PR #3663:
URL: https://github.com/apache/calcite/pull/3663#discussion_r1771726795
##########
core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java:
##########
@@ -1498,7 +1498,7 @@ public static SqlNode toSql(RexLiteral literal) {
case EXACT_NUMERIC: {
if (SqlTypeName.APPROX_TYPES.contains(typeName)) {
return SqlLiteral.createApproxNumeric(
- castNonNull(literal.getValueAs(BigDecimal.class)).toPlainString(),
POS);
+ castNonNull(literal.getValueAs(Double.class)).toString(), POS);
Review Comment:
Maybe we should add Javadoc to prevent someone from changing it back to
BigDecimal later.
##########
arrow/src/main/java/org/apache/calcite/adapter/arrow/ArrowTranslator.java:
##########
@@ -228,6 +228,8 @@ private static String getLiteralType(Object literal) {
}
} else if (String.class.equals(literal.getClass())) {
return "string";
+ } else if (literal instanceof Double) {
+ return "float";
Review Comment:
why `float`?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]