[Improve](row store) avoid serialize null slot into a jsonb row (#17734)
This could save some disk space
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user