mirror of https://github.com/citusdata/citus.git
Add an assert about Param kind
Currently there is a check function used, but let's keep a stronger point for the future, just in case.pull/7914/head
parent
c8afdd0bb8
commit
10c953a883
|
@ -100,6 +100,7 @@ PartiallyEvaluateExpression(Node *expression,
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeTag nodeTag = nodeTag(expression);
|
NodeTag nodeTag = nodeTag(expression);
|
||||||
|
|
||||||
/* ExecInitExpr cannot handle some expressions (PARAM_MULTIEXPR and PARAM_SUBLINK) */
|
/* ExecInitExpr cannot handle some expressions (PARAM_MULTIEXPR and PARAM_SUBLINK) */
|
||||||
if (!CheckExprExecutorSafe(expression))
|
if (!CheckExprExecutorSafe(expression))
|
||||||
{
|
{
|
||||||
|
@ -109,6 +110,8 @@ PartiallyEvaluateExpression(Node *expression,
|
||||||
/* ExecInitExpr cannot handle PARAM_MULTIEXPR and PARAM_SUBLINK but we have guards */
|
/* ExecInitExpr cannot handle PARAM_MULTIEXPR and PARAM_SUBLINK but we have guards */
|
||||||
else if (nodeTag == T_Param)
|
else if (nodeTag == T_Param)
|
||||||
{
|
{
|
||||||
|
Assert(((Param *) expression)->paramkind != PARAM_MULTIEXPR &&
|
||||||
|
((Param *) expression)->paramkind != PARAM_SUBLINK);
|
||||||
return (Node *) citus_evaluate_expr((Expr *) expression,
|
return (Node *) citus_evaluate_expr((Expr *) expression,
|
||||||
exprType(expression),
|
exprType(expression),
|
||||||
exprTypmod(expression),
|
exprTypmod(expression),
|
||||||
|
@ -261,9 +264,11 @@ ShouldEvaluateExpression(Expr *expression)
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue