Andrew Wong has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/16674 )
Change subject: KUDU-1644 hash-partition based in-list predicate optimization ...................................................................... KUDU-1644 hash-partition based in-list predicate optimization Hash prune for single hash-key based inList query. Reduce the values to predicate by hash-partition match. This patch reduces the IN List predicated values to be pushed to tablet without change the content to be returned. Table has P partitions, N records. Inlist predicate has V values. Before: To each tablet, time complexity to complete hash-key based in-list query is: LOG(V) * N After: Complexity becomes: LOG(V/P) * N E.g. Hash partition of table 'profile': hash(id) by id partitions 3, simply use mod as hash function. select * from profile where id in (1,2,3,4,5,6,7,8,9,10) Before: Tablet 1: id in (1,2,3,4,5,6,7,8,9,10) Tablet 2: id in (1,2,3,4,5,6,7,8,9,10) Tablet 3: id in (1,2,3,4,5,6,7,8,9,10) After: Tablet 1: id in (0,3,6,9) Tablet 2: id in (1,4,7,10) Tablet 3: id in (2,5,8) Change-Id: I202001535669a72de7fbb9e766dbc27db48e0aa2 Reviewed-on: http://gerrit.cloudera.org:8080/16674 Tested-by: Kudu Jenkins Reviewed-by: Andrew Wong <[email protected]> --- M java/kudu-client/src/test/java/org/apache/kudu/client/TestAlterTable.java M src/kudu/common/column_predicate.h M src/kudu/common/partial_row.cc M src/kudu/common/partial_row.h M src/kudu/common/partition.cc M src/kudu/common/partition.h M src/kudu/common/partition_pruner-test.cc M src/kudu/common/scan_spec-test.cc M src/kudu/common/scan_spec.cc M src/kudu/common/scan_spec.h M src/kudu/tserver/tablet_service.cc 11 files changed, 552 insertions(+), 26 deletions(-) Approvals: Kudu Jenkins: Verified Andrew Wong: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/16674 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I202001535669a72de7fbb9e766dbc27db48e0aa2 Gerrit-Change-Number: 16674 Gerrit-PatchSet: 20 Gerrit-Owner: wangning <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Bankim Bhavsar <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mahesh Reddy <[email protected]> Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: wangning <[email protected]>
