apache / apache/fluss

[Flink] Flink catalog fails on duplicate index columns

Open
#3,975 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

When multiple Fluss indexes use the same ordered column list, the Flink connector adds all of them to the Flink schema. Flink then rejects the table with:

```text
Invalid index. There is a duplicated index composed of the same columns: [...]
```

### Solution

Update the Flink 2.2 SchemaAdapter to keep only the first index for each ordered column list. Column order remains significant, so [a, b] and [b, a] are different indexes.

### 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

Locate the Flink 2.2 SchemaAdapter and trace how Fluss indexes are converted into the Flink schema. Verify that only the first index is retained for each ordered column list, while [a, b] and [b, a] remain distinct, and confirm that duplicate indexes no longer cause Flink table creation to fail.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.