mihaibudiu commented on code in PR #4043:
URL: https://github.com/apache/calcite/pull/4043#discussion_r1837078401


##########
arrow/src/main/java/org/apache/calcite/adapter/arrow/ArrowTranslator.java:
##########
@@ -234,8 +234,10 @@ private String translateUnaryOp(String op, String name) {
     return name + " " + op;
   }
 
-  private static String getLiteralType(Object literal) {
-    if (literal instanceof BigDecimal) {
+  private static String getLiteralType(Object literal, RelDataType  type) {
+    if (type.getSqlTypeName() == SqlTypeName.DECIMAL) {
+      return "decimal";
+    } else if (literal instanceof BigDecimal) {

Review Comment:
   since now you are passing type information to this function you should use 
it everywhere.  There is no reason to guess the type based on the Java type of 
the literal.



-- 
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]

Reply via email to