resolve pull_up_sublinks fixme (#13317)
resolve pull_up_sublinks fixme (#13317)

PostgreSQL only processes EXISTS_SUBLINK in not clause, does not process ANY_SUBLINK | ALL_SUBLINK, and notclause in not-clause.

the second param of canonicalize_qual in pull_up_sublinks_qual_recurse is false because expr must not be a check constraint.

before commit 220e45b in gpdb5
we optimize ANY_SUBLINK or ALL_SUBLINK in not clause in that case:
NOT val op ANY (subq) => val op' ALL (subq)
NOT val op ALL (subq) => val op' ANY (subq)

after commit 220e45b (11 years ago): Improve the planner's simplification of NOT constructs.

we optimize ANY_SUBLINK or ALL_SUBLINK in not clause in that case:
NOT val op ANY (subq) =>val NOT op ALL (subq)
NOT val op ALL  (subq) =>val NOT op ANY (subq)

then in preprocess_expression-->eval_const_expressions-->eval_const_expressions_mutator
we call negate_clause to optimize val NOT op to val op'.
here we use negate_clause instead make_notclause for ANY_SUBLINK or ALL_SUBLINK in not clause to simply expr in advance.

the test case in notin.sql can cover this pr, so here do not add new cases.

explain select c2 from t2 where not c2 < all (select c2 from t2);
explain select c3 from t3 where not c3 <> any (select c4 from t4);

50wu/gpdb,lisakowen/gpdb,greenplum-db/gpdb,50wu/gpdb,xinzweb/gpdb,lisakowen/gpdb,greenplum-db/gpdb,50wu/gpdb,xinzweb/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,xinzweb/gpdb,xinzweb/gpdb,lisakowen/gpdb,xinzweb/gpdb,greenplum-db/gpdb,lisakowen/gpdb,50wu/gpdb,greenplum-db/gpdb,50wu/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,lisakowen/gpdb,lisakowen/gpdb,xinzweb/gpdb,50wu/gpdb,50wu/gpdb,xinzweb/gpdb,50wu/gpdb,xinzweb/gpdb,lisakowen/gpdb,lisakowen/gpdb