-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: tuple + BETWEEN generates loose spans #20504
Comments
Indeed, the span doesn't look right. Interestingly, separating each condition yields the expected spans:
|
One tuple and one non-tuple also works
|
The We are incrementing This is very old code: 396d543 @danhhz How critical is this for 1.2? |
Good question. I've thought about this a lot more and have convinced myself that this should really be more of a 1.3 thing. From a domiciling perspective, we've got a lot more work to do anyway and for that will probably need some checks at a much lower layer |
Unassigning for now since there's nothing to be done immediately. Thanks for the investigation @RaduBerinde! |
Support for tuple inequalities like `(a, b, c) > (1, 2, 3)`. This code is more functional than the legacy index constraints code: - we support restricting the inequalities to a prefix, e.g. `(a, b, c) > (1, 2, 3) -> (a, b) >= (1, 2)` (cockroachdb#6390). - we correctly handle cases like `(a, b) BETWEEN (1, 2) AND (3, 4))` (cockroachdb#20504). Minor changes to opt test: support `asc/desc` and switch the order of `legacy-normalize` and `build-scalar` in tests (we don't want to build a scalar before doing the normalization). Release note: None
Support for tuple inequalities like `(a, b, c) > (1, 2, 3)`. This code is more functional than the legacy index constraints code: - we support restricting the inequalities to a prefix, e.g. `(a, b, c) > (1, 2, 3) -> (a, b) >= (1, 2)` (cockroachdb#6390). - we correctly handle cases like `(a, b) BETWEEN (1, 2) AND (3, 4))` (cockroachdb#20504). Minor changes to opt test: support `asc/desc` and switch the order of `legacy-normalize` and `build-scalar` in tests (we don't want to build a scalar before doing the normalization). Release note: None
Tuple constraints were previously too loose to be useful in partitioning tests (cockroachdb#20504), but were fixed in cockroachdb#20946. Fix cockroachdb#20504. Release note: None
Fixes cockroachdb#20504. Release note: None
Note that #21317 adds a regression logic test for this. |
Sweet! Thanks! |
I'd expect this scan to be
[/Table/51/1/1/2,/Table/51/1/3/5)
. This is coming up in some upcoming partitioning tests where too many partitions are being scanned. Same things happens forWHERE (a,b) >= (1, 2) AND (a, b) <= (3, 4)
@RaduBerinde can you triage this for me please?
The text was updated successfully, but these errors were encountered: