You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by zt...@apache.org on 2022/12/19 07:38:10 UTC
[hawq] branch master updated: HAWQ-1852. Fix find_udf
This is an automated email from the ASF dual-hosted git repository.
ztao1987 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hawq.git
The following commit(s) were added to refs/heads/master by this push:
new eee2d0dc8 HAWQ-1852. Fix find_udf
eee2d0dc8 is described below
commit eee2d0dc881b78d61743a7be131e670f6e480fe7
Author: ztao1987 <zh...@gmail.com>
AuthorDate: Mon Dec 19 15:36:59 2022 +0800
HAWQ-1852. Fix find_udf
If IsBuildInFunction returns false, then find_udf should return true
directly, which means that the statement contains UDF. Otherwise, it
should continue to recursively determine the args of FuncExpr through
expression_tree_walker, because FuncExpr may contain recursive calls.
For example, suppose "A" is an UDF, then "select A::text" meets this
situation. The outter FuncExpr is "text" and the inner FuncExpr is "A".
---
src/backend/cdb/cdbdatalocality.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/cdb/cdbdatalocality.c b/src/backend/cdb/cdbdatalocality.c
index 67704b8c2..dda79c6b4 100644
--- a/src/backend/cdb/cdbdatalocality.c
+++ b/src/backend/cdb/cdbdatalocality.c
@@ -6142,8 +6142,8 @@ bool udf_collector_walker(Node *node,
if(IsA(node,FuncExpr)){
if(!IsBuildInFunction(((FuncExpr *) node)->funcid)){
context->udf_exist = true;
+ return true;
}
- return false;
}
return expression_tree_walker(node, udf_collector_walker,