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: incorporate operator volatility #49923

Merged
merged 1 commit into from
Jun 8, 2020

Conversation

RaduBerinde
Copy link
Member

Incorporate volatility of operators (unary, binary, comparison) into the
VolatilitySet property.

Unfortunately, this modifies most plans as pretty much everything is
"immutable". Perhaps once this work is behind us we will want to hide this
information from plans in most cases.

Release note: None

@RaduBerinde RaduBerinde requested a review from a team as a code owner June 5, 2020 18:08
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@RaduBerinde RaduBerinde force-pushed the opt-volatility-ops branch 2 times, most recently from c6d2562 to 3968765 Compare June 7, 2020 19:18
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 75 of 75 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @mgartner and @RaduBerinde)


pkg/sql/opt/memo/logical_props_builder.go, line 1376 at r1 (raw file):

		// non-zero constant.
		//
		// TODO(radu): clean up this special case.

Maybe expand on this TODO a bit to note that this case should eventually be removed so all division expressions will have the same logic as the IsBinaryOp logic below.


pkg/sql/opt/memo/logical_props_builder.go, line 1422 at r1 (raw file):

			o, ok := FindUnaryOverload(e.Op(), inputType)
			if !ok {
				panic(errors.AssertionFailedf("unary overload found (%s, %s)", e.Op(), inputType))

found -> not found

Copy link
Collaborator

@mgartner mgartner left a comment

Choose a reason for hiding this comment

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

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

a discussion (no related file):
:lgtm:


Incorporate volatility of operators (unary, binary, comparison) into the
VolatilitySet property.

Unfortunately, this modifies most plans as pretty much everything is
"immutable". Perhaps once this work is behind us we will want to hide this
information from plans in most cases.

Release note: None
Copy link
Member Author

@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.

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


pkg/sql/opt/memo/logical_props_builder.go, line 1376 at r1 (raw file):

Previously, rytaft (Rebecca Taft) wrote…

Maybe expand on this TODO a bit to note that this case should eventually be removed so all division expressions will have the same logic as the IsBinaryOp logic below.

Done.


pkg/sql/opt/memo/logical_props_builder.go, line 1422 at r1 (raw file):

Previously, rytaft (Rebecca Taft) wrote…

found -> not found

Done.

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.

Reviewed 9 of 9 files at r2.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 2 stale) (waiting on @RaduBerinde)

@RaduBerinde
Copy link
Member Author

bors r+

@craig
Copy link
Contributor

craig bot commented Jun 8, 2020

Build succeeded

@craig craig bot merged commit 15c11df into cockroachdb:master Jun 8, 2020
@RaduBerinde RaduBerinde deleted the opt-volatility-ops branch June 10, 2020 22:30
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.

4 participants