Skip to content

PHOENIX-7948 Transform ITs request illegal transform schema options for mutable tables - #2559

Open
apurtell wants to merge 2 commits into
apache:masterfrom
apurtell:PHOENIX-7948
Open

PHOENIX-7948 Transform ITs request illegal transform schema options for mutable tables#2559
apurtell wants to merge 2 commits into
apache:masterfrom
apurtell:PHOENIX-7948

Conversation

@apurtell

@apurtell apurtell commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Phoenix downgrades a requested SINGLE_CELL_ARRAY_WITH_OFFSETS cell encoding scheme to ONE_CELL_PER_COLUMN for any table that is not immutable. Several Transform ITs assert the post-transform schema for mutable tables is SINGLE_CELL_ARRAY_WITH_OFFSETS , which is impossible because of that silent downgrade.

This change makes ALTER TABLE reject a requested SINGLE_CELL_ARRAY_WITH_OFFSETS cell encoding scheme when transforming a mutable table with a new SQLExceptionCode CANNOT_TRANSFORM_MUTABLE_TABLE_TO_SCAWO,
and updates TransformIT, TransformMonitorIT, and TransformToolIT to either declare IMMUTABLE_ROWS=true where 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

@apurtell apurtell changed the title PHOENIX-7948 IndexTwoPhaseCreateIT requests an illegal transform PHOENIX-7948 Transform ITs request illegal transform schema options for mutable tables Jun 29, 2026
…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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants