This is an automated email from the ASF dual-hosted git repository. yjhjstz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit b832648425c4c627c27ce64ac4d8fc3500134718 Author: Ashwin Agrawal <[email protected]> AuthorDate: Mon Feb 27 10:59:33 2023 -0800 Remove FIXME about RelationIs*() macros Yes, wish is these macros shouldn't be required. Table AM serves and hides all the AM level details. Though that's far from reality and not simple or easy to make happen given the current usage of these macros. Yes, iteratively we can move towards the direction to make reach the goal eventually. Till then just convert the FIXME to code comment. --- src/include/utils/rel.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 08dc4a86fb..3c753895f7 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -474,10 +474,12 @@ typedef struct ViewOptions #define InvalidRelation ((Relation) NULL) /* - * We do need the RelationIs* macros because the table access method API is - * not mature enough and/or the append-optimized design is distinct enough. + * CAUTION: this macro is a violation of the absraction that table AM and + * index AM interfaces provide. Use of this macro is discouraged. If + * table/index AM API falls short for your use case, consider enhancing the + * interface. + * */ - #define RelationIsHeap(relation) \ ((relation)->rd_amhandler == F_HEAP_TABLEAM_HANDLER) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
