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: compute join output col map properly #39052

Merged
merged 1 commit into from
Jul 29, 2019
Merged

Conversation

justinj
Copy link
Contributor

@justinj justinj commented Jul 23, 2019

Fixes #39010.

This manifested with the advent of WITH, but the problem was actually
that we were computing a join output map somewhat incorrectly. This
never actually caused problems before because we would prune any columns
that could cause there to be a disparity between the two ways of
computing the size of the ColMap, but since WITH doesn't support
pruning, it caused issues.

I also replaced some other uses of Len that were potentially sketchy.

Release note: None

@justinj justinj requested a review from RaduBerinde July 23, 2019 17:27
@justinj justinj requested a review from a team as a code owner July 23, 2019 17:27
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

I hate these maps. Maybe we should at least make a wrapper specific to the colid-to-plannode-ordinal map and put more functionality (like `numOutputColsInMap`) in there.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @RaduBerinde)

@justinj
Copy link
Contributor Author

justinj commented Jul 23, 2019

bors r+

@craig
Copy link
Contributor

craig bot commented Jul 23, 2019

Build failed

Copy link
Collaborator

@rytaft rytaft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained

Fixes cockroachdb#39010.

This manifested with the advent of WITH, but the problem was actually
that we were computing a join output map somewhat incorrectly. This
never actually caused problems before because we would prune any columns
that could cause there to be a disparity between the two ways of
computing the size of the ColMap, but since WITH doesn't support
pruning, it caused issues.

I also replaced some other uses of Len that were potentially sketchy.

Release note: None
@RaduBerinde
Copy link
Member

Shoudl we re-bors this?

@justinj
Copy link
Contributor Author

justinj commented Jul 29, 2019

oops, yup, meant to.

bors r+

craig bot pushed a commit that referenced this pull request Jul 29, 2019
39052: opt: compute join output col map properly r=justinj a=justinj

Fixes #39010.

This manifested with the advent of WITH, but the problem was actually
that we were computing a join output map somewhat incorrectly. This
never actually caused problems before because we would prune any columns
that could cause there to be a disparity between the two ways of
computing the size of the ColMap, but since WITH doesn't support
pruning, it caused issues.

I also replaced some other uses of Len that were potentially sketchy.

Release note: None

Co-authored-by: Justin Jaffray <justin@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Jul 29, 2019

Build succeeded

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.

sql: internal error: invalid var index
4 participants