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

Function ExecIsExprUnsafeToConst_walker

src/backend/executor/execExpr.c:4359–4388  ·  view source on GitHub ↗

* ExecIsExprUnsafeToConst_walker * * Almost all of the expressions are not allowed without the executor. * Returns true as soon as possible we find such unsafe nodes. */

Source from the content-addressed store, hash-verified

4357 * Returns true as soon as possible we find such unsafe nodes.
4358 */
4359static bool
4360ExecIsExprUnsafeToConst_walker(Node *node, void *context)
4361{
4362 switch(nodeTag(node))
4363 {
4364 /*
4365 * Param can be a Const in some situation, but the demanded use case
4366 * so far doesn't want it.
4367 */
4368 case T_Const:
4369 case T_CaseTestExpr:
4370 case T_FuncExpr:
4371 case T_OpExpr:
4372 case T_DistinctExpr:
4373 case T_ScalarArrayOpExpr:
4374 case T_BoolExpr:
4375 case T_CaseExpr:
4376 case T_CoalesceExpr:
4377 case T_MinMaxExpr:
4378 case T_NullIfExpr:
4379 case T_NullTest:
4380 case T_BooleanTest:
4381 case T_List:
4382 case T_TypeCast:
4383 return false;
4384
4385 default:
4386 return true;
4387 }
4388}
4389
4390/*
4391 * ExecIsExprUnsafeToConst

Callers 1

ExecIsExprUnsafeToConstFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected