Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIXME] Wrong results on main branch for INDF query #180

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

wenchaozhang-123
Copy link
Contributor

GPDB_12_MERGE_FIXME: the following comparison query has an ORCA plan that relies on "IS NOT DISTINCT FROM" Hash Join, a variant that we likely have lost during the merge with upstream Postgres 12. Disable ORCA for this query

Issue: HASH Join(left, right, inner) removing NULL tuples when there is INDF in query.

The field hashqualclauses in HashJoin node holds the expressions "IS NOT DISTINCT FROM" that test for match. This is normally idential to hashclauses but differs in case of non-equijoin comparision.

While scanning the HashBucket we were using hashclauses so we missed the expressions with "IS NOT DISTINCT FROM".

closes: #ISSUE_Number


Change logs

Describe your change clearly, including what problem is being solved or what feature is being added.

If it has some breaking backward or forward compatibility, please clary.

Why are the changes needed?

Describe why the changes are necessary.

Does this PR introduce any user-facing change?

If yes, please clarify the previous behavior and the change this PR proposes.

How was this patch tested?

Please detail how the changes were tested, including manual tests and any relevant unit or integration tests.

Contributor's Checklist

Here are some reminders and checklists before/when submitting your pull request, please check them:

  • Make sure your Pull Request has a clear title and commit message. You can take git-commit template as a reference.
  • Sign the Contributor License Agreement as prompted for your first-time contribution.
  • List your communication in the GitHub Issues or Discussions (if has or needed).
  • Document changes.
  • Add tests for the change
  • Pass make installcheck
  • Pass make -C src/test installcheck-cbdb-parallel
  • Feel free to @cloudberrydb/dev team for review and approval when your PR is ready🥳

GPDB_12_MERGE_FIXME: the following comparison query has an ORCA plan that
relies on "IS NOT DISTINCT FROM" Hash Join, a variant that we likely have
lost during the merge with upstream Postgres 12. Disable ORCA for this query

Issue: HASH Join(left, right, inner) removing NULL tuples when there is
INDF in query.

The field hashqualclauses in HashJoin node holds the expressions "IS NOT
DISTINCT FROM" that test for match. This is normally idential to
hashclauses but differs in case of non-equijoin comparision.

While scanning the HashBucket we were using hashclauses so we missed
the expressions with "IS NOT DISTINCT FROM".
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@my-ship-it my-ship-it merged commit 6537e4c into apache:main Sep 1, 2023
@wenchaozhang-123 wenchaozhang-123 deleted the distinct_from_new branch September 1, 2023 06:02
baotingfang pushed a commit that referenced this pull request Dec 1, 2023
GPDB_12_MERGE_FIXME: the following comparison query has an ORCA plan that
relies on "IS NOT DISTINCT FROM" Hash Join, a variant that we likely have
lost during the merge with upstream Postgres 12. Disable ORCA for this query

Issue: HASH Join(left, right, inner) removing NULL tuples when there is
INDF in query.

The field hashqualclauses in HashJoin node holds the expressions "IS NOT
DISTINCT FROM" that test for match. This is normally idential to
hashclauses but differs in case of non-equijoin comparision.

While scanning the HashBucket we were using hashclauses so we missed
the expressions with "IS NOT DISTINCT FROM".

Co-authored-by: hari krishna <hmaddileti@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants