apache / apache/fluss

Support ALTER MATERIALIZED TABLE ... AS <query> in FlinkCatalog

Open
#3,595 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.1k
Forks
625
Avg merge
3d 14h
Merged PRs (30d)
97

Description

### Search before asking

- [x] I searched in the [issues](https://github.com/apache/fluss/issues) and found nothing similar.

### Motivation

`FlinkCatalog#alterTable` does not support altering a materialized table's
definition query. When a user runs `ALTER MATERIALIZED TABLE AS `,
Flink produces a `TableChange.ModifyDefinitionQuery`, but `FlinkConversions`
falls through to the default branch and throws: `UnsupportedOperationException: Unsupported flink table change: ...`

### Solution

_No response_

### Anything else?

_No response_

### Willingness to contribute

- [x] I'm willing to submit a PR!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at FlinkCatalog#alterTable and follow the FlinkConversions handling for TableChange.ModifyDefinitionQuery. Reproduce ALTER MATERIALIZED TABLE AS and trace the default branch that throws UnsupportedOperationException; done means the definition query is accepted and updated without that exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.