Skip to content

xform: reorganize rules and tests for consistency#55654

Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom
mgartner:xform-refactor
Oct 20, 2020
Merged

xform: reorganize rules and tests for consistency#55654
craig[bot] merged 2 commits intocockroachdb:masterfrom
mgartner:xform-refactor

Conversation

@mgartner
Copy link
Copy Markdown
Contributor

xform: organize rules by the type of expressions they match

This commit organizes exploration rules by the type of expressions they
match. GenerateZigzagJoins and GenerateInvertedZigzagJoins have been
moved to select.opt. All other rules were correctly organized.

Release note: None

xform: reorganize tests to match the organization of the rules

This commit moves around (and makes some minor necessary changes) to
exploration tests so that tests for rules in foo.opt can be found in
testdata/foo. Most of the changes were related to zigzag join rules
which moved from join to select, and some tests for
GenerateConstrainedScans that have lived in scan for years.

The goal of this change is to make it easier to find tests for a
specific rule and to set a precedent for future tests.

Release note: None

@mgartner mgartner requested a review from a team as a code owner October 17, 2020 00:44
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
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:

Reviewed 2 of 2 files at r1, 4 of 4 files at r2.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rytaft)

This commit organizes exploration rules by the type of expressions they
match. `GenerateZigzagJoins` and `GenerateInvertedZigzagJoins` have been
moved to `select.opt`. All other rules were correctly organized.

Release note: None
This commit moves around (and makes some minor necessary changes) to
exploration tests so that tests for rules in `foo.opt` can be found in
`testdata/foo`. Most of the changes were related to zigzag join rules
which moved from `join` to `select`, and some tests for
`GenerateConstrainedScans` that have lived in `scan` for years.

The goal of this change is to make it easier to find tests for a
specific rule and to set a precedent for future tests.

Release note: None
@mgartner
Copy link
Copy Markdown
Contributor Author

bors r=RaduBerinde

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Oct 20, 2020

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Oct 20, 2020

Build succeeded:

@craig craig bot merged commit e25436f into cockroachdb:master Oct 20, 2020
@mgartner mgartner deleted the xform-refactor branch October 20, 2020 16:00
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.

3 participants