Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/15556 )
Change subject: Add core algorithms for columnar serialization ...................................................................... Patch Set 4: (5 comments) http://gerrit.cloudera.org:8080/#/c/15556/4/src/kudu/common/columnar_serialization.cc File src/kudu/common/columnar_serialization.cc: http://gerrit.cloudera.org:8080/#/c/15556/4/src/kudu/common/columnar_serialization.cc@51 PS4, Line 51: skip_initial_bits Maybe, add DCHECK_GE(skip_initial_bits, 0) or make type of skip_initial_bits an unsigned type? Or skip_initial_bits can be negative? http://gerrit.cloudera.org:8080/#/c/15556/4/src/kudu/common/columnar_serialization.cc@64 PS4, Line 64: buffered_values_ |= v << num_buffered_bits_; In addition, maybe it's worth adding DCHECK_GE(num_buffered_bits_, 0) due to the Flush()'s behavior? http://gerrit.cloudera.org:8080/#/c/15556/4/src/kudu/common/columnar_serialization.cc@251 PS4, Line 251: #endif nit: for better readability, could you add comments about current scope? For example, here it would be #endif // #ifdef __x86_64__ ... http://gerrit.cloudera.org:8080/#/c/15556/4/src/kudu/common/columnar_serialization.cc@314 PS4, Line 314: while (rem--) { Add DCHECK_GT(n_sel_rows, 0) ? http://gerrit.cloudera.org:8080/#/c/15556/4/src/kudu/common/columnar_serialization.cc@338 PS4, Line 338: case 1: : CopySelectedRowsImpl<1>(sel_rows, src_buf, dst_buf); : break; : case 2: : CopySelectedRowsImpl<2>(sel_rows, src_buf, dst_buf); : break; : case 4: : CopySelectedRowsImpl<4>(sel_rows, src_buf, dst_buf); : break; : case 8: : CopySelectedRowsImpl<8>(sel_rows, src_buf, dst_buf); : break; : case 16: : CopySelectedRowsImpl<16>(sel_rows, src_buf, dst_buf); : break; Use same macro-alike approach here as at line 144? -- To view, visit http://gerrit.cloudera.org:8080/15556 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I16f2993081aac54609aab4d8219ef0bf6c7708c2 Gerrit-Change-Number: 15556 Gerrit-PatchSet: 4 Gerrit-Owner: Todd Lipcon <t...@apache.org> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Andrew Wong <andrew.w...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Grant Henke <granthe...@apache.org> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-Comment-Date: Thu, 26 Mar 2020 05:16:36 +0000 Gerrit-HasComments: Yes