MCPcopy Create free account
hub / github.com/apache/cloudberry / transformExprRecurse

Function transformExprRecurse

src/backend/parser/parse_expr.c:115–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115static Node *
116transformExprRecurse(ParseState *pstate, Node *expr)
117{
118 Node *result;
119
120 if (expr == NULL)
121 return NULL;
122
123 /* Guard against stack overflow due to overly complex expressions */
124 check_stack_depth();
125
126 switch (nodeTag(expr))
127 {
128 case T_ColumnRef:
129 result = transformColumnRef(pstate, (ColumnRef *) expr);
130 break;
131
132 case T_ParamRef:
133 result = transformParamRef(pstate, (ParamRef *) expr);
134 break;
135
136 case T_A_Const:
137 {
138 A_Const *con = (A_Const *) expr;
139 Value *val = &con->val;
140
141 result = (Node *) make_const(pstate, val, con->location);
142 break;
143 }
144
145 case T_A_Indirection:
146 result = transformIndirection(pstate, (A_Indirection *) expr);
147 break;
148
149 case T_A_ArrayExpr:
150 result = transformArrayExpr(pstate, (A_ArrayExpr *) expr,
151 InvalidOid, InvalidOid, -1);
152 break;
153
154 case T_TypeCast:
155 result = transformTypeCast(pstate, (TypeCast *) expr);
156 break;
157
158 case T_CollateClause:
159 result = transformCollateClause(pstate, (CollateClause *) expr);
160 break;
161
162 case T_A_Expr:
163 {
164 A_Expr *a = (A_Expr *) expr;
165
166 switch (a->kind)
167 {
168 case AEXPR_OP:
169 result = transformAExprOp(pstate, a);
170 break;
171 case AEXPR_OP_ANY:
172 result = transformAExprOpAny(pstate, a);

Callers 15

transformExprFunction · 0.85
transformIndirectionFunction · 0.85
transformAExprOpFunction · 0.85
transformAExprOpAnyFunction · 0.85
transformAExprOpAllFunction · 0.85
transformAExprDistinctFunction · 0.85
transformAExprNullIfFunction · 0.85
transformAExprInFunction · 0.85
transformAExprBetweenFunction · 0.85
transformBoolExprFunction · 0.85
transformFuncCallFunction · 0.85
transformMultiAssignRefFunction · 0.85

Calls 15

check_stack_depthFunction · 0.85
transformColumnRefFunction · 0.85
transformParamRefFunction · 0.85
make_constFunction · 0.85
transformIndirectionFunction · 0.85
transformArrayExprFunction · 0.85
transformTypeCastFunction · 0.85
transformCollateClauseFunction · 0.85
transformAExprOpFunction · 0.85
transformAExprOpAnyFunction · 0.85
transformAExprOpAllFunction · 0.85
transformAExprDistinctFunction · 0.85

Tested by

no test coverage detected