You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ad...@apache.org on 2019/08/02 03:00:44 UTC
[kudu] 02/03: [tablet] the row size is equal to schema size plus
null bitmap size
This is an automated email from the ASF dual-hosted git repository.
adar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
commit d5eb6832704fc11a624e5d02a5910dc96245ca3c
Author: helifu <hz...@corp.netease.com>
AuthorDate: Fri Aug 2 08:58:10 2019 +0800
[tablet] the row size is equal to schema size plus null bitmap size
The DCHECK_EQ statement in debug mode is not true while there are
nullable columns in schema.
Change-Id: Id26650c58f5c8f32a233901605f3c4543b05f3b3
Reviewed-on: http://gerrit.cloudera.org:8080/13985
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>
---
src/kudu/tablet/cfile_set-test.cc | 2 +-
src/kudu/tablet/tablet-test-util.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kudu/tablet/cfile_set-test.cc b/src/kudu/tablet/cfile_set-test.cc
index 33f21d3..e3fd517 100644
--- a/src/kudu/tablet/cfile_set-test.cc
+++ b/src/kudu/tablet/cfile_set-test.cc
@@ -73,7 +73,7 @@ class TestCFileSet : public KuduRowSetTest {
TestCFileSet() :
KuduRowSetTest(Schema({ ColumnSchema("c0", INT32),
ColumnSchema("c1", INT32, false, nullptr, nullptr, GetRLEStorage()),
- ColumnSchema("c2", INT32) }, 1))
+ ColumnSchema("c2", INT32, true) }, 1))
{}
virtual void SetUp() OVERRIDE {
diff --git a/src/kudu/tablet/tablet-test-util.h b/src/kudu/tablet/tablet-test-util.h
index 599f113..3215254 100644
--- a/src/kudu/tablet/tablet-test-util.h
+++ b/src/kudu/tablet/tablet-test-util.h
@@ -333,7 +333,7 @@ static inline Status DumpTablet(const Tablet& tablet,
template<class RowSetWriterClass>
static Status WriteRow(const Slice &row_slice, RowSetWriterClass *writer) {
const Schema &schema = writer->schema();
- DCHECK_EQ(row_slice.size(), schema.byte_size());
+ DCHECK_EQ(row_slice.size(), schema.byte_size() + ContiguousRowHelper::null_bitmap_size(schema));
RowBlock block(&schema, 1, nullptr);
ConstContiguousRow row(&schema, row_slice.data());