opt: fix panic in findJoinFilterRange#69013
Conversation
rytaft
left a comment
There was a problem hiding this comment.
nit: in the commit / PR message: "There is no release not" -> "There is no release note"
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @cucaroach and @mgartner)
pkg/sql/opt/xform/join_funcs.go, line 1184 at r1 (raw file):
for filterIdx := range filters { props := filters[filterIdx].ScalarProps() if props.TightConstraints && props.Constraints.Length() > 0 && !props.Constraints.IsUnconstrained() {
nit: you can remove the check for !props.Constraints.IsUnconstrained(), since an unconstrained Set also has length 0.
This commit fixes a panic produced in `findJoinFilterRange` when attempting to access the 0-th constraint in an empty constraint set. Fixes cockroachdb#68975 There is no release note because the bug is not present in any releases. Release note: None
ca3fc0a to
c96618d
Compare
mgartner
left a comment
There was a problem hiding this comment.
nit: in the commit / PR message: "There is no release not" -> "There is no release note"
Fixed.
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @cucaroach and @rytaft)
pkg/sql/opt/xform/join_funcs.go, line 1184 at r1 (raw file):
Previously, rytaft (Rebecca Taft) wrote…
nit: you can remove the check for
!props.Constraints.IsUnconstrained(), since an unconstrainedSetalso has length 0.
Done.
rytaft
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status:complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @cucaroach)
|
TFTR! bors r+ |
|
Build succeeded: |
This commit fixes a panic produced in
findJoinFilterRangewhenattempting to access the 0-th constraint in an empty constraint set.
Fixes #68975
There is no release note because the bug is not present in any releases.
Release note: None