diff --git a/src/gausskernel/optimizer/plan/streamwalker.cpp b/src/gausskernel/optimizer/plan/streamwalker.cpp index 9f3951282..c147443c8 100644 --- a/src/gausskernel/optimizer/plan/streamwalker.cpp +++ b/src/gausskernel/optimizer/plan/streamwalker.cpp @@ -817,8 +817,14 @@ static bool table_contain_unsupport_feature(Oid relid, Query* query) static bool contain_unsupport_function(Oid funcId) { - if (funcId >= FirstNormalObjectId) + if (funcId >= FirstNormalObjectId) { +#if (!defined(ENABLE_MULTIPLE_NODES)) && (!defined(ENABLE_PRIVATEGAUSS)) + if (u_sess->hook_cxt.aggSmpHook != NULL) { + return ((aggSmpFunc)(u_sess->hook_cxt.aggSmpHook))(funcId); + } +#endif return true; + } for (uint i = 0; i < lengthof(unsupport_func); i++) { if (funcId == unsupport_func[i]) diff --git a/src/include/knl/knl_session.h b/src/include/knl/knl_session.h index cde82ff7a..9374eb3e1 100644 --- a/src/include/knl/knl_session.h +++ b/src/include/knl/knl_session.h @@ -2641,6 +2641,7 @@ typedef struct knl_u_hook_context { void *transformStmtHook; void *execInitExprHook; void *computeHashHook; + void *aggSmpHook; } knl_u_hook_context; typedef struct knl_session_context { diff --git a/src/include/optimizer/streamplan.h b/src/include/optimizer/streamplan.h index 478da8448..ce01de91a 100644 --- a/src/include/optimizer/streamplan.h +++ b/src/include/optimizer/streamplan.h @@ -191,4 +191,9 @@ extern bool remove_local_plan(Plan* stream_plan, Plan* parent, ListCell* lc, boo errmsg("%s : LZ4_compress_default destination buffer couldn't hold all the information", hint))); \ } \ } while (0) + +#if (!defined(ENABLE_MULTIPLE_NODES)) && (!defined(ENABLE_PRIVATEGAUSS)) +typedef bool (*aggSmpFunc)(Oid funcId); +#endif + #endif /* STREAMPLAN_H */