-
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
opt: error when selecting from table with partitioned primary and secondary index with different partition column types #86168
Labels
branch-release-22.1
Used to mark GA and release blockers, technical advisories, and bugs for 22.1
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
release-blocker
Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.
T-sql-queries
SQL Queries Team
Comments
rytaft
added
the
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
label
Aug 15, 2022
rytaft
added
release-blocker
Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.
branch-release-22.1
Used to mark GA and release blockers, technical advisories, and bugs for 22.1
labels
Aug 15, 2022
craig bot
pushed a commit
that referenced
this issue
Aug 16, 2022
86078: sql/stats: generate statistics forecasts r=rytaft,yuzefovich a=michae2 **sql/stats: use nil eval.Context as CompareContext when forecasting** When forecasting table statistics, we don't need a full *eval.Context. We can simply use a nil *eval.Context as a tree.CompareContext. This means we don't have to plumb an eval.Context into the stats cache. Assists: #79872 Release note: None **sql/stats: generate statistics forecasts in the stats cache** As of this commit, we now try to generate statistics forecasts for every column of every table. This happens whenever statistics are loaded into or refreshed in the stats cache. We use only the forecasts that fit the historical collected statistics very well, meaning we have high confidence in their accuracy. Fixes: #79872 Release note (performance improvement): Enable table statistics forecasts, which predict future statistics based on historical collected statistics. Forecasts help the optimizer produce better plans for queries that read data modified after the latest statistics collection. We use only the forecasts that fit the historical collected statistics very well, meaning we have high confidence in their accuracy. Forecasts can be viewed using `SHOW STATISTICS FOR TABLE ... WITH FORECAST`. **sql: show forecasted stats time in EXPLAIN** When using statistics forecasts, add the forecast time (which could be in the future) to EXPLAIN output. This both indicates that forecasts are in use, and gives us an idea of how up-to-date / ahead they are. Assists: #79872 Release note: None **sql/opt: add tests for statistics forecasts** Add a few simple testcases for usage of statistics forecasts by the optimizer. Assists: #79872 Release note: None --- Release justification: Enable feature before we get too far into stability period. 86137: sql: use DelRange with tombstone in `force_delete_table_data` r=ajwerner a=ajwerner Fixes #85754 Release justification: minor change needed to adopt MVCC bulk ops fully Release note: None 86160: colexecerror: do not annotate the context canceled error r=yuzefovich a=yuzefovich This commit makes it so that the context canceled error doesn't get annotated with an assertion failure when it doesn't have a valid PG code. This makes sure that the sentry issues don't get filed for the context canceled errors - they are expected to occur. Fixes: #82947 Release note: None Release justification: bug fix. 86164: sql: deflake TestRoleOptionsMigration15000User r=ajwerner a=RichardJCai Previously it was flakey because we always assumed the first user created had ID 100, however this is not the case due to transaction failures. Release note: None Release justification: test only 86173: opt: fix error due to unsupported comparison for partitioned secondary index r=rytaft a=rytaft This commit fixes a bug where we were attempting to find the locality of the partitions in a secondary index, but we passed the incorrect index ordinal to the function `IndexPartitionLocality`. Fixes #86168 Release justification: Category 3: Fixes for high-priority or high-severity bugs in existing functionality Release note (bug fix): Fixed a bug that existed on v22.1.0-v22.1.5, where attempting to select data from a table that had different partitioning columns used for the primary and secondary indexes could cause an error. This occured if the primary index had zone configurations applied to the index partitions with different regions for different partitions, and the secondary index had a different column type than the primary index for its partitioning column(s). Co-authored-by: Michael Erickson <[email protected]> Co-authored-by: Andrew Werner <[email protected]> Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: richardjcai <[email protected]> Co-authored-by: Rebecca Taft <[email protected]>
rytaft
added a commit
to rytaft/cockroach
that referenced
this issue
Aug 16, 2022
…y index This commit fixes a bug where we were attempting to find the locality of the partitions in a secondary index, but we passed the incorrect index ordinal to the function IndexPartitionLocality. Fixes cockroachdb#86168 Release note (bug fix): Fixed a bug that existed on v22.1.0-v22.1.5, where attempting to select data from a table that had different partitioning columns used for the primary and secondary indexes could cause an error. This occured if the primary index had zone configurations applied to the index partitions with different regions for different partitions, and the secondary index had a different column type than the primary index for its partitioning column(s).
Reopening until #86218 is merged |
#86218 is merged, closing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
branch-release-22.1
Used to mark GA and release blockers, technical advisories, and bugs for 22.1
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
release-blocker
Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.
T-sql-queries
SQL Queries Team
Describe the problem
On 22.1.0-22.1.5, attempting to select data from a table which has different partitioning columns used for the primary and secondary indexes can cause an error. This occurs if the primary index has zone configurations applied with different regions for different partitions, and the secondary index has a different column type than the primary index for its partitioning column.
To Reproduce
Run a demo cluster with CockroachDB v22.1.5 using:
Then run:
After a few seconds, run:
It produces this error:
Expected behavior
This should not produce any error.
Environment:
cockroach demo
Jira issue: CRDB-18609
The text was updated successfully, but these errors were encountered: