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

Fix several issues that manifest when using GROUP BY #4549

Merged
merged 1 commit into from
Oct 19, 2022
Merged

Conversation

msullivan
Copy link
Member

It is common to hit materialization when using GROUP BY. This fixes a
cluster of them.

  1. When looking for a materialized pointer inside a source rvar
    grabbing a pointer, discard any namespaces that are not on the source
    path. unpack_rvar won't put those namespaces on the path, so we can't
    either.
  2. Explicitly track the binding scope for visibility materialization,
    and use that when checking for visibility.

Fixes #3951. Fixes #4240. Fixes #4481.

Issues #3951 and #4240 depend on fix 1, #4481 depends on fix 2. Fix 2
also fixed two existing xerrored tests and turns one of the worst
remaining miscompiles into an ISE.

It is common to hit materialization when using GROUP BY. This fixes a
cluster of them.

1. When looking for a materialized pointer inside a source rvar
grabbing a pointer, discard any namespaces that are not on the source
path. unpack_rvar won't put those namespaces on the path, so we can't
either.
2. Explicitly track the binding scope for visibility materialization,
and use that when checking for visibility.

Fixes #3951. Fixes #4240. Fixes #4481.

Issues #3951 and #4240 depend on fix 1, #4481 depends on fix 2. Fix 2
also fixed two existing xerrored tests and turns one of the worst
remaining miscompiles into an ISE.
@msullivan msullivan merged commit 0e4a2d1 into master Oct 19, 2022
@msullivan msullivan deleted the group-trouble branch October 19, 2022 05:06
msullivan added a commit that referenced this pull request Oct 20, 2022
It is common to hit materialization bugs when using GROUP BY. This fixes a
cluster of them.

1. When looking for a materialized pointer inside a source rvar
grabbing a pointer, discard any namespaces that are not on the source
path. unpack_rvar won't put those namespaces on the path, so we can't
either.
2. Explicitly track the binding scope for visibility materialization,
and use that when checking for visibility.

Fixes #3951. Fixes #4240. Fixes #4481.

Issues #3951 and #4240 depend on fix 1, #4481 depends on fix 2. Fix 2
also fixed two existing xerrored tests and turns one of the worst
remaining miscompiles into an ISE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants