Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/15424 )
Change subject: [client] Add C++ API to accept BlockBloomFilter directly ...................................................................... Patch Set 1: (2 comments) http://gerrit.cloudera.org:8080/#/c/15424/1/src/kudu/client/client.cc File src/kudu/client/client.cc: http://gerrit.cloudera.org:8080/#/c/15424/1/src/kudu/client/client.cc@1025 PS1, Line 1025: reinterpret_cast<BlockBloomFilterBufferAllocatorIf*>(const_cast<uint8_t*>(allocator.data())); You can call mutable_data() instead of data(); it does the const_cast for you. Below too. http://gerrit.cloudera.org:8080/#/c/15424/1/src/kudu/client/scan_predicate-internal.h File src/kudu/client/scan_predicate-internal.h: http://gerrit.cloudera.org:8080/#/c/15424/1/src/kudu/client/scan_predicate-internal.h@147 PS1, Line 147: // This class is designed to accept BlockBloomFilter directly as raw pointer : // from consumers like Impala. In such a case, the data is owned by the caller and not : // by the instance of this class. So storing raw pointers and not destructing the pointers would : // have worked fine. However for the case when predicate data is Clone()'d the internal data : // is owned by the instance of this class. Hence using smart pointers with custom deleter : // to keep track of ownership. This is a useful comment, but I think it'd be better placed on DirectBloomFilterDataDeleter, to explain why it's this weird deleter with a runtime switch for no-oping. -- To view, visit http://gerrit.cloudera.org:8080/15424 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iea85e3da8fe55f78e49a80439e6af723aa3d970b Gerrit-Change-Number: 15424 Gerrit-PatchSet: 1 Gerrit-Owner: Bankim Bhavsar <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Bankim Bhavsar <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Thomas Tauber-Marshall <[email protected]> Gerrit-Reviewer: Wenzhe Zhou <[email protected]> Gerrit-Comment-Date: Fri, 13 Mar 2020 04:29:48 +0000 Gerrit-HasComments: Yes
