Abort code generation of expression evaluation trees with unsupported ExprState types
Current codegen expression evaluation framework generates code based only on
ExprState->Expr->type (e.g., T_Var), without checking the ExprState->type.
In other words, it treats all nodes of the tree that have the same type
(e.g., T_Var) in the same way (i.e., generates the same code).
However, in GPDB the evaluation function (evalfunc) of a node depends
on ExprState->Expr->type and ExprState->type. For example, if
ExprState->Expr->type = T_Var and ExprState->type = T_ExprState, then
the evalfunc = ExecEvalScalarVar. On the other hand, if
ExprState->Expr->type = T_Var and ExprState->type =
T_WholeRowVarExprState, then evalfunc = ExecEvalWholeRowVar.
We fix this issue by avoiding code generation for an expression tree
that contains nodes of unsupported ExprState->type.
Signed-off-by: NKaren Huddleston <khuddleston@pivotal.io>
Showing
想要评论请 注册 或 登录