Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/21541 )
Change subject: IMPALA-12906: Incorporate scan range information into the tuple cache key ...................................................................... Patch Set 6: (2 comments) http://gerrit.cloudera.org:8080/#/c/21541/6/be/src/scheduling/scheduler.cc File be/src/scheduling/scheduler.cc: http://gerrit.cloudera.org:8080/#/c/21541/6/be/src/scheduling/scheduler.cc@601 PS6, Line 601: if (a_hdfs_split.mtime() > b_hdfs_split.mtime()) return true; I think this is insufficient. If a.mtime < b.mtime and a.offset > b.offset, then ScanRangeComparator(a, b) is true and ScanRangeComparator(b, a) is true. That doesn't satisfy Compare. So I think - given a predicate function Pred - you need to do the full if (Pred(a) > Pred(b)) return true; if (Pred(a) < Pred(b)) return false; Could simplify to if (auto pa = Pred(a), pb = Pred(b); pa != pb) return pa > pb; I'd recommend using tuple comparison, but I don't think there's a lazy version. http://gerrit.cloudera.org:8080/#/c/21541/6/be/src/scheduling/scheduler.cc@637 PS6, Line 637: // To make this determinstic, break ties by comparing the instance idxs nit: deterministic -- To view, visit http://gerrit.cloudera.org:8080/21541 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibe298fff0f644ce931a2aa934ebb98f69aab9d34 Gerrit-Change-Number: 21541 Gerrit-PatchSet: 6 Gerrit-Owner: Joe McDonnell <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Kurt Deschler <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Yida Wu <[email protected]> Gerrit-Comment-Date: Tue, 20 Aug 2024 20:14:32 +0000 Gerrit-HasComments: Yes
