Preserve explicitly enforced zonemaps when partition keys are changed or dropped.
Details
| Detail name | Value |
|---|---|
| Changelog Number | 30918 |
| Type | Bug |
| Status | Resolved |
| Affected Versions | Exasol 8.18.0, Exasol 8.29.0, Exasol 2025.1.0, Exasol 2026.1.0 |
| Fix Versions | Exasol 2026.1.1, Exasol 2025.1.14 |
| Resolution Date | 2026-08-06 |
Description
Dropping or changing the partition keys of a table could remove zonemaps that were explicitly created using ENFORCE ZONEMAP.
This happened when all the following criteria were met:
- The table was partitioned.
- One or more zonemaps had been explicitly created using ENFORCE ZONEMAP.
- The partition keys were changed or dropped using ALTER TABLE.
Example
CREATE OR REPLACE TABLE T1 AS
SELECT
range_value AS i,
4 * range_value AS j,
100000 - 2 * range_value AS k
FROM VALUES BETWEEN 1 AND 10000;
ALTER TABLE T1 PARTITION BY i, j;
ENFORCE ZONEMAP ON T1(k);
SELECT COLUMN_NAME, COLUMN_IS_ZONEMAPPED
FROM SYS.EXA_ALL_COLUMNS
WHERE COLUMN_SCHEMA = CURRENT_SCHEMA
AND COLUMN_TABLE = 'T1';
-- Observed before ALTER TABLE:
-- K: TRUE
ALTER TABLE T1 DROP PARTITION KEYS;
SELECT COLUMN_NAME, COLUMN_IS_ZONEMAPPED
FROM SYS.EXA_ALL_COLUMNS
WHERE COLUMN_SCHEMA = CURRENT_SCHEMA
AND COLUMN_TABLE = 'T1';
-- Expected: K remains TRUE.
-- Observed before the fix: K becomes FALSE.
Workaround
Recreate the required zonemaps after changing or dropping partition keys using ENFORCE ZONEMAP.
ALTER TABLE T1 DROP PARTITION KEYS; ENFORCE ZONEMAP ON T1(k);
Fix
Explicitly enforced zonemaps are now preserved when partition keys are changed or dropped. Only zonemaps associated with partition columns are updated automatically.