You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ji...@apache.org on 2023/03/14 14:13:53 UTC
[doris] branch master updated: [Improve](row store) avoid serialize null slot into a jsonb row (#17734)
This is an automated email from the ASF dual-hosted git repository.
jianliangqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 7180cf3d9b [Improve](row store) avoid serialize null slot into a jsonb row (#17734)
7180cf3d9b is described below
commit 7180cf3d9bcaca2710757cde01047ffaedf204db
Author: lihangyu <15...@163.com>
AuthorDate: Tue Mar 14 22:13:41 2023 +0800
[Improve](row store) avoid serialize null slot into a jsonb row (#17734)
This could save some disk space
---
be/src/vec/jsonb/serialize.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/be/src/vec/jsonb/serialize.cpp b/be/src/vec/jsonb/serialize.cpp
index 8a25a64424..6739ada85b 100644
--- a/be/src/vec/jsonb/serialize.cpp
+++ b/be/src/vec/jsonb/serialize.cpp
@@ -157,11 +157,11 @@ static void deserialize_column(PrimitiveType type, JsonbValue* slot_value, Mutab
static void serialize_column(Arena* mem_pool, const TabletColumn& tablet_column,
const IColumn* column, const StringRef& data_ref, int row,
JsonbWriterT<JsonbOutStream>& jsonb_writer) {
- jsonb_writer.writeKey(tablet_column.unique_id());
if (is_column_null_at(row, column, tablet_column.type(), data_ref)) {
- jsonb_writer.writeNull();
+ // Do nothing
return;
}
+ jsonb_writer.writeKey(tablet_column.unique_id());
if (tablet_column.is_array_type()) {
const char* begin = nullptr;
StringRef value = column->serialize_value_into_arena(row, *mem_pool, begin);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org