gortiz commented on code in PR #11749:
URL: https://github.com/apache/pinot/pull/11749#discussion_r1348478585


##########
pinot-common/src/main/java/org/apache/pinot/common/request/context/LiteralContext.java:
##########
@@ -43,154 +39,202 @@
  */
 public class LiteralContext {
   // TODO: Support all of the types for sql.
-  private final FieldSpec.DataType _type;
+  private final DataType _type;
   private final Object _value;
-  private final BigDecimal _bigDecimalValue;
 
-  private static BigDecimal getBigDecimalValue(FieldSpec.DataType type, Object 
value) {
-    switch (type) {
-      case BIG_DECIMAL:
-        return (BigDecimal) value;
-      case BOOLEAN:
-        return PinotDataType.BOOLEAN.toBigDecimal(value);
-      case TIMESTAMP:
-        return 
PinotDataType.TIMESTAMP.toBigDecimal(Timestamp.valueOf(value.toString()));
-      default:
-        if (type.isNumeric()) {
-          return new BigDecimal(value.toString());
-        }
-        return BigDecimal.ZERO;
-    }
-  }
+  // PinotDataType is used for the type conversion.
+  private final transient PinotDataType _pinotDataType;

Review Comment:
   why `transient`? This class is not serializable, right?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to