Todd Lipcon has posted comments on this change. Change subject: Allow to pad UNIXTIME_MICROS slots in scan results ......................................................................
Patch Set 4: (4 comments) http://gerrit.cloudera.org:8080/#/c/6623/4/src/kudu/common/wire_protocol-test.cc File src/kudu/common/wire_protocol-test.cc: PS4, Line 248: *reinterpret_cast<int64_t*>(row.mutable_cell_ptr(0)) = i; : Slice col1; : // See: FillRowBlockWithTestRows() for the reason why we relocate these : // to 'test_data_arena_'. : CHECK(test_data_arena_.RelocateSlice("hello world col1", &col1)); : *reinterpret_cast<Slice*>(row.mutable_cell_ptr(1)) = col1; : *reinterpret_cast<int64_t*>(row.mutable_cell_ptr(2)) = i; : *reinterpret_cast<int32_t*>(row.mutable_cell_ptr(3)) = i; : row.cell(3).set_null(false); : *reinterpret_cast<int64_t*>(row.mutable_cell_ptr(4)) = i; : row.cell(4).set_null(true); would using RowBuilder be simpler here? http://gerrit.cloudera.org:8080/#/c/6623/4/src/kudu/common/wire_protocol.cc File src/kudu/common/wire_protocol.cc: PS4, Line 691: has_nullable_cols > Do we only care about zeroing out memory if we're padding for Impala? good catch, agree we need to zero the columns in the case of nulls too. Line 700: size_t new_base_size = row_stride * num_rows; hrm, I would expect this variable to be equal to old_size + row_stride * num_rows (the new size) rather than just the change in size. Maybe call it "additional_size" or something? http://gerrit.cloudera.org:8080/#/c/6623/4/src/kudu/common/wire_protocol.h File src/kudu/common/wire_protocol.h: Line 130: bool pad_unixtime_micros_for_impala = false); doc -- To view, visit http://gerrit.cloudera.org:8080/6623 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I99fc6d3be089d19ebe2e70c938f2405c381578b4 Gerrit-PatchSet: 4 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: David Ribeiro Alves <dral...@apache.org> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Jean-Daniel Cryans <jdcry...@apache.org> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Matthew Jacobs <m...@cloudera.com> Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-HasComments: Yes