Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/9783 )
Change subject: KUDU-16 pt 1: add server-side limits on scanners ...................................................................... Patch Set 5: (5 comments) http://gerrit.cloudera.org:8080/#/c/9783/1/src/kudu/common/scan_spec.h File src/kudu/common/scan_spec.h: http://gerrit.cloudera.org:8080/#/c/9783/1/src/kudu/common/scan_spec.h@172 PS1, Line 172: It would be cleaner to use an optional<int64_t> if you don't want to special case 0 (I wouldn't be against the special case). http://gerrit.cloudera.org:8080/#/c/9783/1/src/kudu/common/scan_spec.cc File src/kudu/common/scan_spec.cc: http://gerrit.cloudera.org:8080/#/c/9783/1/src/kudu/common/scan_spec.cc@132 PS1, Line 132: const string limit = has_limit_ ? Substitute(" LIMIT $0", limit_) : ""; nice. http://gerrit.cloudera.org:8080/#/c/9783/1/src/kudu/common/wire_protocol.cc File src/kudu/common/wire_protocol.cc: http://gerrit.cloudera.org:8080/#/c/9783/1/src/kudu/common/wire_protocol.cc@771 PS1, Line 771: for (int i = 0; i < run_size && !has_fulfilled_limit(); i++) { You can avoid adding another runtime check in the inner loop by hoisting the check: auto limit = max_num_rows_to_return && max_num_rows_to_return - rows_returned > limit ? max_num_rows_to_return - rows_returned : limit; for (int64_t i = 0; i < limit; i++) { ... http://gerrit.cloudera.org:8080/#/c/9783/1/src/kudu/tserver/tablet_service.cc File src/kudu/tserver/tablet_service.cc: http://gerrit.cloudera.org:8080/#/c/9783/1/src/kudu/tserver/tablet_service.cc@494 PS1, Line 494: limit do s/limitted/limited http://gerrit.cloudera.org:8080/#/c/9783/1/src/kudu/tserver/tserver.proto File src/kudu/tserver/tserver.proto: http://gerrit.cloudera.org:8080/#/c/9783/1/src/kudu/tserver/tserver.proto@229 PS1, Line 229: // DEPRECATED: use column_predicates field. Thanks for adding this. Going forward I'd be in favor of using the deprecated=true option and _not_ renaming the field with the DEPRECATED_ prefix. I think the reason we did that was that we didn't know about the deprecated option. That being said, in this case I think you shouldn't introduce a new field, you should just reuse the existing one. You can change the type, however I don't see a downside to keeping it unsigned? -- To view, visit http://gerrit.cloudera.org:8080/9783 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3ca5ddff09f4910d12f80259bd11e4027f99aa7c Gerrit-Change-Number: 9783 Gerrit-PatchSet: 5 Gerrit-Owner: Andrew Wong <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Comment-Date: Sat, 24 Mar 2018 11:31:13 +0000 Gerrit-HasComments: Yes
