tupleDesc数据结构及相关函数调用优化

This commit is contained in:
wanghao19920907
2023-02-21 20:30:35 -08:00
parent fd1f338af5
commit 9f84893535
274 changed files with 1982 additions and 2045 deletions

View File

@ -192,7 +192,7 @@ void VectorBatch::init(MemoryContext cxt, TupleDesc desc)
{
ScalarDesc scalar_desc;
Form_pg_attribute* attrs = desc->attrs;
FormData_pg_attribute* attrs = desc->attrs;
m_cols = desc->natts;
@ -206,13 +206,13 @@ void VectorBatch::init(MemoryContext cxt, TupleDesc desc)
m_arr = New(cxt) ScalarVector[m_cols];
for (int i = 0; i < m_cols; i++) {
scalar_desc.encoded = COL_IS_ENCODE(attrs[i]->atttypid);
scalar_desc.typeId = attrs[i]->atttypid;
scalar_desc.encoded = COL_IS_ENCODE(attrs[i].atttypid);
scalar_desc.typeId = attrs[i].atttypid;
/* for vector result batch, treat tid as int8 */
if (scalar_desc.typeId == TIDOID) {
scalar_desc.typeId = INT8OID;
}
scalar_desc.typeMod = attrs[i]->atttypmod;
scalar_desc.typeMod = attrs[i].atttypmod;
m_arr[i].init(cxt, scalar_desc);
}
}