add aggSmpHook

This commit is contained in:
ganyang
2022-08-24 17:45:52 +08:00
parent 90c9c23c57
commit 4f83bc8745
3 changed files with 13 additions and 1 deletions

View File

@ -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])

View File

@ -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 {

View File

@ -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 */