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

opt: do not pass along non-inverted prefix columns from left inverted join #58163

Closed
mgartner opened this issue Dec 22, 2020 · 1 comment
Closed
Assignees
Labels
A-sql-optimizer SQL logical planning and optimizations. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@mgartner
Copy link
Collaborator

The optimizer outputs non-inverted prefix columns in inverted joins on multi-column indexes. This column will passthrough the parent left lookup join, yielding incorrect results. In a left inverted join, only the primary key columns should be output. The rest of the columns must be fetched in the left lookup join.

@mgartner mgartner added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-sql-optimizer SQL logical planning and optimizations. labels Dec 22, 2020
@mgartner mgartner self-assigned this Dec 22, 2020
@mgartner
Copy link
Collaborator Author

This should not be an issue. I assumed it was causing incorrect results, but the issue appears to be related to #58892. Fixing that bug should fix the incorrect results I was seeing. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-optimizer SQL logical planning and optimizations. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

No branches or pull requests

1 participant