[FEAT MERGE] column store ddl

Co-authored-by: AnimationFan <30674773338@qq.com>
Co-authored-by: simonjoylet <simonjoylet@gmail.com>
Co-authored-by: Monk-Liu <1152761042@qq.com>
This commit is contained in:
Charles0429
2023-12-18 14:13:53 +00:00
committed by ob-robot
parent 37fe7ce4eb
commit e99cc037cc
354 changed files with 29601 additions and 7742 deletions

View File

@ -649,6 +649,70 @@ ObTMSegmentArray<T, max_block_size, BlockAllocatorT, auto_free,
this->set_tenant_id(MTL_ID());
}
static bool is_fixed_length(ObObjType type) {
bool is_fixed = true;
ObObjTypeClass tc = ob_obj_type_class(type);
OB_ASSERT(tc >= ObNullTC && tc < ObMaxTC);
if (ObNumberTC == tc
|| ObExtendTC == tc
|| ObTextTC == tc
|| ObStringTC == tc
|| ObEnumSetInnerTC == tc
|| ObRawTC == tc
|| ObRowIDTC == tc
|| ObLobTC == tc
|| ObJsonTC == tc
|| ObGeometryTC == tc
|| ObUserDefinedSQLTC == tc
|| ObDecimalIntTC == tc) {
is_fixed = false;
}
return is_fixed;
}
static int16_t get_type_fixed_length(ObObjType type) {
int16_t len = 0;
ObObjTypeClass tc = ob_obj_type_class(type);
OB_ASSERT(tc >= ObNullTC && tc < ObMaxTC);
switch (tc)
{
case ObUIntTC:
case ObIntTC:
case ObDoubleTC:
case ObDateTimeTC:
case ObTimeTC:
case ObBitTC:
case ObEnumSetTC:
{
len = 8;
break;
}
case ObDateTC:
case ObFloatTC:
{
len = 4;
break;
}
case ObYearTC:
{
len = 1;
break;
}
case ObOTimestampTC: {
len = (type == ObTimestampTZType) ? 12 : 10;
break;
}
case ObIntervalTC:
{
len = (type == ObIntervalYMType) ? 8 : 12;
break;
}
default:
break;
}
return len;
}
} // namespace sql
} // namespace oceanbase
#endif /* OCEANBASE_SQL_OB_SQL_DEFINE_H_ */