This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new 5688a9afc KUDU-1261 fix criteria to select proper block writer
5688a9afc is described below
commit 5688a9afc53de46b2b2f6847bc5217f38e926fe8
Author: Alexey Serbin <[email protected]>
AuthorDate: Thu Oct 23 16:32:39 2025 -0700
KUDU-1261 fix criteria to select proper block writer
This fixed a bug in the criteria to select a proper method for writing
a particular column in MultiColumnWriter::AppendBlock(). The issue
would manifest itself when flushing memrowset containing a non-nullable
array column. I'm not including tests in this particular changelist
because there is one already in a pending changelist [1] and in a
follow-up changelist including end-to-end tests for Kudu C++ client [2].
This is a follow-up to 9a1c19fd0853aef54bdd52af69194ee43f2a33b6.
[1] https://gerrit.cloudera.org/#/c/23565/
[2] https://gerrit.cloudera.org/#/c/23220/
Change-Id: I7041cd6a8c6f1bbcefacdb7cd3821e96774a60a2
Reviewed-on: http://gerrit.cloudera.org:8080/23589
Reviewed-by: Abhishek Chennaka <[email protected]>
Tested-by: Alexey Serbin <[email protected]>
---
src/kudu/tablet/multi_column_writer.cc | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/kudu/tablet/multi_column_writer.cc
b/src/kudu/tablet/multi_column_writer.cc
index 241f01cff..cdc494009 100644
--- a/src/kudu/tablet/multi_column_writer.cc
+++ b/src/kudu/tablet/multi_column_writer.cc
@@ -110,15 +110,15 @@ Status MultiColumnWriter::AppendBlock(const RowBlock&
block) {
DCHECK(open_);
for (auto i = 0; i < schema_->num_columns(); ++i) {
ColumnBlock column = block.column_block(i);
- if (!column.is_nullable()) {
- RETURN_NOT_OK(cfile_writers_[i]->AppendEntries(column.data(),
column.nrows()));
+ if (column.type_info()->is_array()) {
+ RETURN_NOT_OK(cfile_writers_[i]->AppendNullableArrayEntries(
+ column.non_null_bitmap(), column.data(), column.nrows()));
} else {
- if (column.type_info()->is_array()) {
- RETURN_NOT_OK(cfile_writers_[i]->AppendNullableArrayEntries(
- column.non_null_bitmap(), column.data(), column.nrows()));
- } else {
+ if (column.is_nullable()) {
RETURN_NOT_OK(cfile_writers_[i]->AppendNullableEntries(
column.non_null_bitmap(), column.data(), column.nrows()));
+ } else {
+ RETURN_NOT_OK(cfile_writers_[i]->AppendEntries(column.data(),
column.nrows()));
}
}
}