KKcorps commented on code in PR #10386:
URL: https://github.com/apache/pinot/pull/10386#discussion_r1139949252
##########
pinot-common/src/main/java/org/apache/pinot/common/request/context/LiteralContext.java:
##########
@@ -37,68 +45,116 @@ public class LiteralContext {
private FieldSpec.DataType _type;
private Object _value;
- // TODO: Support all data types.
- private static FieldSpec.DataType
convertThriftTypeToDataType(Literal._Fields fields) {
- switch (fields) {
- case LONG_VALUE:
- return FieldSpec.DataType.LONG;
- case BOOL_VALUE:
- return FieldSpec.DataType.BOOLEAN;
- case DOUBLE_VALUE:
- return FieldSpec.DataType.DOUBLE;
- case STRING_VALUE:
- return FieldSpec.DataType.STRING;
+ private 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:
Review Comment:
Do we not need to handle BYTES value?
--
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]