KKcorps commented on a change in pull request #6053: URL: https://github.com/apache/incubator-pinot/pull/6053#discussion_r496982316
########## File path: pinot-core/src/main/java/org/apache/pinot/core/common/ObjectSerDeUtils.java ########## @@ -776,31 +781,30 @@ public IdSet deserialize(ByteBuffer byteBuffer) { } }; + public static final ObjectSerDe<BigDecimal> BIGDECIMAL_SER_DE = new ObjectSerDe<BigDecimal>() { + + @Override + public byte[] serialize(BigDecimal value) { + return DataTypeConversionFunctions.bigDecimalToBytes(value); + } + + @Override + public BigDecimal deserialize(byte[] bytes) { + return new BigDecimal(DataTypeConversionFunctions.bytesToBigDecimal(bytes)); + } + + @Override + public BigDecimal deserialize(ByteBuffer byteBuffer) { + byte[] bytes = new byte[byteBuffer.remaining()]; + byteBuffer.get(bytes); + return deserialize(bytes); + } + }; + // NOTE: DO NOT change the order, it has to be the same order as the ObjectType //@formatter:off - private static final ObjectSerDe[] SER_DES = { - STRING_SER_DE, - LONG_SER_DE, - DOUBLE_SER_DE, - DOUBLE_ARRAY_LIST_SER_DE, - AVG_PAIR_SER_DE, - MIN_MAX_RANGE_PAIR_SER_DE, - HYPER_LOG_LOG_SER_DE, - QUANTILE_DIGEST_SER_DE, - MAP_SER_DE, - INT_SET_SER_DE, - TDIGEST_SER_DE, - DISTINCT_TABLE_SER_DE, - DATA_SKETCH_SER_DE, - GEOMETRY_SER_DE, - ROARING_BITMAP_SER_DE, - LONG_SET_SER_DE, - FLOAT_SET_SER_DE, - DOUBLE_SET_SER_DE, - STRING_SET_SER_DE, - BYTES_SET_SER_DE, - ID_SET_SER_DE - }; + private static final ObjectSerDe[] SER_DES = Review comment: resolved. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org