PHOENIX-7948 Transform ITs request illegal transform schema options for mutable tables - #2559
Open
apurtell wants to merge 2 commits into
Open
PHOENIX-7948 Transform ITs request illegal transform schema options for mutable tables#2559apurtell wants to merge 2 commits into
apurtell wants to merge 2 commits into
Conversation
…or mutable tables Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Rejects invalid SCAWO transforms for mutable Phoenix tables and aligns transform integration tests with the immutable-row requirement.
Changes:
- Adds a dedicated SQL error and validation.
- Updates transform maintenance accessors.
- Adjusts and categorizes transform integration tests.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
TransformToolIT.java |
Updates transform scenarios and rejection coverage. |
TransformMonitorIT.java |
Aligns monitor tests with immutable tables. |
TransformIT.java |
Adds mutable-table rejection coverage. |
IndexTwoPhaseCreateIT.java |
Makes the SCAWO test table immutable. |
TransformMaintainer.java |
Exposes its covered-column map. |
MetaDataClient.java |
Validates mutable-to-SCAWO transforms. |
IndexMaintainer.java |
Uses virtual covered-column accessors. |
SQLExceptionCode.java |
Adds the new transform error code. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+4954
to
+4956
| boolean willBeImmutableForScheme = | ||
| Boolean.TRUE.equals(metaPropertiesEvaluated.getIsImmutableRows()) | ||
| || (metaPropertiesEvaluated.getIsImmutableRows() == null && table.isImmutableRows()); |
Comment on lines
+1781
to
+1783
| * table. TransformMaintainer shadows {@link #coveredColumnsMap} with its own field, so callers in | ||
| * code paths shared with TransformMaintainer must use this accessor rather than reading the field | ||
| * directly to avoid dereferencing the uninitialized copy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phoenix downgrades a requested
SINGLE_CELL_ARRAY_WITH_OFFSETScell encoding scheme toONE_CELL_PER_COLUMNfor any table that is not immutable. Several Transform ITs assert the post-transform schema for mutable tables isSINGLE_CELL_ARRAY_WITH_OFFSETS, which is impossible because of that silent downgrade.This change makes
ALTER TABLEreject a requestedSINGLE_CELL_ARRAY_WITH_OFFSETScell encoding scheme when transforming a mutable table with a newSQLExceptionCodeCANNOT_TRANSFORM_MUTABLE_TABLE_TO_SCAWO,and updates
TransformIT,TransformMonitorIT, andTransformToolITto either declareIMMUTABLE_ROWS=truewhere the test does not specifically test the mutable case, or expect the new exception where it does.Other related issues with Transform ITs are also addressed.
Co-authored-by: Claude Opus 4.8[1m] noreply@anthropic.com