gpdb
gpdb copied to clipboard
Don't pull up sublink to a lateral join on 6X.
This is for fix issue https://github.com/greenplum-db/gpdb/issues/16866. On GPDB6, it will pull up the sublink to a laterial join, which will result error "illegal rescan of motion node".
PG doesn't do the pull up and the laterial is not fullly supported on 6X. Therefore this PR bring back the contain_vars_of_level check, which is align with upstream.
Here are some reminders before you submit the pull request
- [ ] Add tests for the change
- [ ] Document changes
- [ ] Communicate in the mailing list if needed
- [ ] Pass
make installcheck - [ ] Review a PR in return to support the community