Repository navigation
Conversation
…eration - Move the tests into `@Nested` classes `RefreshStatements`, `Create`, `Convert`, `Alter` and `SuspendAndResume` - Keep `testData` next to its test in `RefreshStatements` under `@TestInstance(PER_CLASS)` - Move the statements only `Alter` uses into `Alter` Generated-by: Claude Code (Claude Opus 5.5)
Timm0
marked this pull request as ready for review
December 2, 2026 10:40
Collaborator
AHeise
reviewed
Dec 2, 2026
AHeise
left a comment
Contributor
There was a problem hiding this comment.
Thanks, this looks good to me. With the pre-check gone, materializeInto reaches the same handleConvert and executor convert path as CREATE OR ALTER MATERIALIZED TABLE, and the descriptor and SQL merge contexts agree on partition keys, schema/constraint flags, options, distribution and start mode. I found no correctness issue.
The three inline comments are all optional: a test for the conversion-disabled case through the Table API, a docs note for StreamTableEnvironment.create(env, settings), and the error message / Javadoc wording.
- Remove the regular-table check in `MaterializedPipelineImpl`, so `CreateMode.createOrAlter()` converts a regular table when `table.materialized-table.conversion-from-table.enabled` is set, as `CREATE OR ALTER MATERIALIZED TABLE` does - Name the table, the option and where to set it in the error for a regular table with conversion disabled (shared with SQL) - Document the conversion in the `MaterializedPipeline#execute`, `CreateMode#createOrAlter()` and `MaterializedTableDescriptor.Builder#partitionedBy` Javadoc and in `table-api.md` - Cover continuous conversion and the full-refresh rejection without a workflow scheduler in `DefaultMaterializedTableExecutorTest`, and the rejection with conversion disabled in `MaterializedTableTableApiITCase`; drop the obsolete rejection test in `MaterializedPipelineImplTest` Generated-by: Claude Code (Claude Opus 5.5)
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.
What is the purpose of the change
Table#materializeInto(...).execute()rejected a regular table at the path, althoughCREATE OR ALTER MATERIALIZED TABLEconverts one whentable.materialized-table.conversion-from-table.enabledis set. This pull request removes theTable API check, so
materializeIntogoes through the sharedMaterializedTableOperationFactoryand behaves as SQL: it converts the table when conversion is enabled and rejects it otherwise.Brief change log
MaterializedPipelineImpl. UnderCreateMode.createOrAlter()a regular table is converted, or rejected by the shared factory when conversion is disabled.CreateMode.failIfExists()is unchanged.MaterializedPipeline#executeandCreateMode#createOrAlter()Javadoc, and added a "Converting a Regular Table" section totable-api.md(en + zh) that links the SQL conversion rules.DefaultMaterializedTableExecutorTestinto@Nestedclasses per operation. The second commit holds the change.Verifying this change
DefaultMaterializedTableExecutorTest.Convert#materializeIntoConvertsARegularTable:materializeIntoon a regular table converts it into anACTIVATEDcontinuous materialized table and submits one refresh job.DefaultMaterializedTableExecutorTest.Convert#materializeIntoKeepsARegularTableWhenFullRefreshHasNoScheduler: a full-refresh conversion without a workflow scheduler fails before the catalog changes, and the table stays a regular table with no job submitted.MaterializedPipelineImplTest#regularTableAtThePathIsRejected, which tested the removed check. Rejection with conversion disabled stays covered on the shared path bySqlNodeToOperationConvertTableToMaterializedTableTest.MaterializedTableTableApiITCaseand the table-module test suites pass.Does this pull request potentially affect one of the following parts:
@Public(Evolving): yesDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Claude Opus 5.5)