Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/backend/gpopt/translate/CTranslatorRelcacheToDXL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2433,6 +2433,19 @@ CTranslatorRelcacheToDXL::RetrieveRelStorageType(Relation rel)
case HEAP_TABLE_AM_OID:
rel_storage_type = IMDRelation::ErelstorageHeap;
break;
// FIXME: need to add support for custom table am!!!
//
// Why 7014 here?
// Because we defined a custom table am using columnar storage,
// the orca optimizer does not support am other than HEAP/AO/AOCS. At present,
// there is no way to extend orca to support custom table am. So here we use
// the am_id(7014) we assigned to the custom table am, and let the orca optimizer
// treat this columnar storage format as AOCS to generate an execution plan
//
// Why use the magic number 7014 instead of the macro definition?
// Just to make it look like it doesn't make sense,
// so others will notice that the logic needs to be refactored
case 7014:
case AO_COLUMN_TABLE_AM_OID:
rel_storage_type = IMDRelation::ErelstorageAppendOnlyCols;
break;
Expand Down