Yan-Daojiang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24158
Change subject: [tablet] optimize MemRowSet scan to single-pass changelist application ...................................................................... [tablet] optimize MemRowSet scan to single-pass changelist application Previously, ApplyMutationsToProjectedRow applied mutations by iterating through the RowChangeList once per projected column, creating a new RowChangeListDecoder for each column and calling ApplyToOneColumn. This resulted in O(P * C) complexity where P is the number of projected columns and C is the number of column updates in the changelist. This patch replaces the multi-pass approach with a single-pass traversal: decode each column update once and use the projection schema's find_column_by_id() (via DecodedUpdate::Validate()) as the reverse mapping to locate the destination column. Updates for columns not in the projection are simply skipped. This reduces the complexity to O(C). The improvement is most significant for wide-table scans with many projected columns and long mutation chains, where the old code would re-decode the same changelist bytes P times. Change-Id: I7ccdfcf207680261907d025b64a9b046bb108f13 --- M src/kudu/tablet/memrowset-test.cc M src/kudu/tablet/memrowset.cc 2 files changed, 251 insertions(+), 9 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/58/24158/1 -- To view, visit http://gerrit.cloudera.org:8080/24158 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I7ccdfcf207680261907d025b64a9b046bb108f13 Gerrit-Change-Number: 24158 Gerrit-PatchSet: 1 Gerrit-Owner: Yan-Daojiang <[email protected]>
