Address pykello's feedback

pull/3543/head
Hadi Moshayedi 2020-02-26 07:17:32 -08:00
parent 1b3e58f0c3
commit e7cce40e6e
1 changed files with 3 additions and 2 deletions

View File

@ -636,6 +636,7 @@ SimplifyPruningTree(PruningTreeNode *node, PruningTreeNode *parent)
/* Boolean operator with single (recognized/unknown) constraint gets simplified */ /* Boolean operator with single (recognized/unknown) constraint gets simplified */
if (ConstraintCount(node) <= 1) if (ConstraintCount(node) <= 1)
{ {
Assert(node->childBooleanNodes == NIL);
parent->validConstraints = list_concat(parent->validConstraints, parent->validConstraints = list_concat(parent->validConstraints,
node->validConstraints); node->validConstraints);
parent->hasInvalidConstraints = parent->hasInvalidConstraints || parent->hasInvalidConstraints = parent->hasInvalidConstraints ||
@ -1898,8 +1899,8 @@ CreatePruningNode(BoolExprType boolop)
{ {
PruningTreeNode *node = palloc0(sizeof(PruningTreeNode)); PruningTreeNode *node = palloc0(sizeof(PruningTreeNode));
node->boolop = boolop; node->boolop = boolop;
node->childBooleanNodes = NULL; node->childBooleanNodes = NIL;
node->validConstraints = NULL; node->validConstraints = NIL;
node->hasInvalidConstraints = false; node->hasInvalidConstraints = false;
return node; return node;
} }