placeholder for insert overwrite partition

This commit is contained in:
leftgeek 2024-07-15 10:17:42 +00:00 committed by ob-robot
parent 1925efa4bd
commit 8c4077254d
2 changed files with 27 additions and 7 deletions

View File

@ -710,6 +710,7 @@ int ObCreateHiddenTableArg::assign(const ObCreateHiddenTableArg &arg)
for (int64_t i = 0; OB_SUCC(ret) && i < common::ObNLSFormatEnum::NLS_MAX; i++) {
nls_formats_[i].assign_ptr(arg.nls_formats_[i].ptr(), static_cast<int32_t>(arg.nls_formats_[i].length()));
}
OZ (tablet_ids_.assign(arg.tablet_ids_));
}
return ret;
}
@ -740,6 +741,9 @@ OB_DEF_SERIALIZE(ObCreateHiddenTableArg)
}
}
}
if (OB_SUCC(ret)) {
OB_UNIS_ENCODE(tablet_ids_);
}
}
return ret;
}
@ -779,6 +783,9 @@ OB_DEF_DESERIALIZE(ObCreateHiddenTableArg)
allocator_.free(tmp_ptr[i]);
}
}
if (OB_SUCC(ret)) {
OB_UNIS_DECODE(tablet_ids_);
}
}
return ret;
}
@ -807,6 +814,9 @@ OB_DEF_SERIALIZE_SIZE(ObCreateHiddenTableArg)
len += nls_formats_[i].get_serialize_size();
}
}
if (OB_SUCC(ret)) {
OB_UNIS_ADD_LEN(tablet_ids_);
}
}
if (OB_FAIL(ret)) {
len = -1;
@ -2509,7 +2519,8 @@ OB_DEF_SERIALIZE(ObAlterTableArg)
rebuild_index_arg_list_,
client_session_id_,
client_session_create_ts_,
lock_priority_);
lock_priority_,
is_direct_load_partition_);
return ret;
}
@ -2606,7 +2617,8 @@ OB_DEF_DESERIALIZE(ObAlterTableArg)
rebuild_index_arg_list_,
client_session_id_,
client_session_create_ts_,
lock_priority_);
lock_priority_,
is_direct_load_partition_);
return ret;
}
@ -2656,7 +2668,8 @@ OB_DEF_SERIALIZE_SIZE(ObAlterTableArg)
rebuild_index_arg_list_,
client_session_id_,
client_session_create_ts_,
lock_priority_);
lock_priority_,
is_direct_load_partition_);
}
if (OB_FAIL(ret)) {

View File

@ -1870,7 +1870,8 @@ public:
K_(ddl_stmt_str),
K_(sql_mode),
K_(tz_info_wrap),
"nls_formats", common::ObArrayWrap<common::ObString>(nls_formats_, common::ObNLSFormatEnum::NLS_MAX));
"nls_formats", common::ObArrayWrap<common::ObString>(nls_formats_, common::ObNLSFormatEnum::NLS_MAX),
K_(tablet_ids));
ObCreateHiddenTableArg() :
ObDDLArg(),
tenant_id_(common::OB_INVALID_ID),
@ -1882,7 +1883,8 @@ public:
ddl_stmt_str_(),
sql_mode_(0),
tz_info_wrap_(),
nls_formats_{}
nls_formats_{},
tablet_ids_()
{}
~ObCreateHiddenTableArg()
{
@ -1899,6 +1901,7 @@ public:
ddl_type_ = share::DDL_INVALID;
ddl_stmt_str_.reset();
sql_mode_ = 0;
tablet_ids_.reset();
}
int assign(const ObCreateHiddenTableArg &arg);
public:
@ -1915,6 +1918,7 @@ public:
common::ObTimeZoneInfo tz_info_;
common::ObTimeZoneInfoWrap tz_info_wrap_;
common::ObString nls_formats_[common::ObNLSFormatEnum::NLS_MAX];
common::ObSArray<common::ObTabletID> tablet_ids_;
};
struct ObCreateHiddenTableRes final
@ -2171,7 +2175,8 @@ public:
rebuild_index_arg_list_(),
client_session_id_(0),
client_session_create_ts_(0),
lock_priority_(transaction::tablelock::ObTableLockPriority::NORMAL)
lock_priority_(transaction::tablelock::ObTableLockPriority::NORMAL),
is_direct_load_partition_(false)
{
}
virtual ~ObAlterTableArg()
@ -2244,7 +2249,8 @@ public:
K_(alter_auto_partition_attr),
K_(client_session_id),
K_(client_session_create_ts),
K_(lock_priority));
K_(lock_priority),
K_(is_direct_load_partition));
private:
int alloc_index_arg(const ObIndexArg::IndexActionType index_action_type, ObIndexArg *&index_arg);
public:
@ -2284,6 +2290,7 @@ public:
uint32_t client_session_id_;
int64_t client_session_create_ts_;
transaction::tablelock::ObTableLockPriority lock_priority_;
bool is_direct_load_partition_;
int serialize_index_args(char *buf, const int64_t data_len, int64_t &pos) const;
int deserialize_index_args(const char *buf, const int64_t data_len, int64_t &pos);
int64_t get_index_args_serialize_size() const;