siddharthteotia commented on a change in pull request #4535: Implement DISTINCT
clause
URL: https://github.com/apache/incubator-pinot/pull/4535#discussion_r320624572
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/common/ObjectSerDeUtils.java
##########
@@ -277,6 +281,36 @@ public HyperLogLog deserialize(ByteBuffer byteBuffer) {
}
};
+ public static final ObjectSerDe<DistinctTable> DISTINCT_TABLE_SER_DE = new
ObjectSerDe<DistinctTable>() {
+
+ @Override
+ public byte[] serialize(DistinctTable tupleHolder) {
+ try {
+ return tupleHolder.toBytes();
+ } catch (IOException e) {
+ throw new RuntimeException("Caught exception while serializing
TupleHolder", e);
+ }
+ }
+
+ @Override
+ public DistinctTable deserialize(byte[] bytes) {
+ try {
+ return new DistinctTable(ByteBuffer.wrap(bytes));
+ } catch (IOException e) {
+ throw new RuntimeException("Caught exception while de-serializing
HyperLogLog", e);
Review comment:
Thanks -- copy paste error
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]