Description
In versions of CockroachDB 21.1 and 21.2 prior to 21.1.13 and 21.2.3, planning queries over partitioned tables with aDEFAULT partition in a PARTITION BY LIST clause could cause a spurious internal error with text “empty Datums being compared to other”. This issue could occur when a query contained a WHERE clause including at least one indexed column from the partitioned index, but not the first column.
The issue does not exist on 20.2 and prior versions.
Statement
This is resolved by a fix in CockroachDB which prevents queries over tables with aDEFAULT partition from causing the internal error “empty Datums being compared to other”.
The fix has been applied to maintenance releases of CockroachDB 21.1.13 and 21.2.3.
Mitigation
Users of CockroachDB 21.1 and 21.2 using partitioned tables with aDEFAULT partition in a PARTITION BY LIST clause are encouraged to upgrade to 21.1.13, 21.2.3, or a later version. To avoid further errors while still on prior versions, users can either remove the DEFAULT partition, or if this is not possible, ensure that their queries always have a predicate on the first column of the partitioned index when there is a WHERE clause. For example:
Given a table:
21.1.13 will be released on Jan 10, 2022.
Impact
Users of CockroachDB 21.1 and 21.2 using partitioned tables with aDEFAULT partition in a PARTITION BY LIST clause may not have been able to run certain queries in their workload due to an internal error during planning.
Please reach out to the support team if you need more information or assistance.
