adjust compact row format

This commit is contained in:
18523270951@163.com
2024-01-26 04:42:16 +00:00
committed by ob-robot
parent a9af16f714
commit 718216ee0c

View File

@ -26,22 +26,13 @@ class ObIAllocator;
namespace sql namespace sql
{ {
struct RowHeader { struct RowHeader {
RowHeader() : row_size_(0), has_null_(false) {} RowHeader() : row_size_(0) {}
TO_STRING_KV(K_(row_size), K_(offset_len), K_(has_null)); TO_STRING_KV(K_(row_size));
public: public:
static const int64_t OFFSET_LEN = 4; static const int64_t OFFSET_LEN = 4;
uint32_t row_size_; uint32_t row_size_;
union {
struct {
//TODO shengle support dynamic offset len, no use now, now only use int32_t
uint32_t offset_len_ : 3;
uint32_t has_null_ : 1;
uint32_t reserved_ : 28;
};
uint32_t flag_;
};
}; };
struct RowMeta { struct RowMeta {
@ -190,7 +181,6 @@ struct ObCompactRow
inline void set_null(const RowMeta &meta, const int64_t col_idx) { inline void set_null(const RowMeta &meta, const int64_t col_idx) {
nulls()->set(col_idx); nulls()->set(col_idx);
header_.has_null_ = true;
if (meta.fixed_expr_reordered()) { if (meta.fixed_expr_reordered()) {
const int32_t idx = meta.project_idx(col_idx); const int32_t idx = meta.project_idx(col_idx);
if (idx < meta.fixed_cnt_) { if (idx < meta.fixed_cnt_) {