[Regression] No easy way to access IndexMetaData from a ColumnMetaData

Description

From version 2.1.x and before, we can access an indexMetadata from the columnMetadata very easily : columnMeta.getIndex()

From version 2.2.x and 3.0.x, it's nearly impossible. With ColumnMetadata we can get the name of the column. From the TableMetadata object we can have a list of IndexMetadata.

However, there is no easy way to match an IndexMetadata with a ColumnMetadata (to answer the very simple question: does this column has an index on it or not ?).

One solution could be to match columnMetadata.getName() with indexMetadata.getTarget() but because of the type of index (KEYS, FULL, ENTRIES), the index target contains not only column name but also the type of index.

Furthermore, it is not easy to rely on indexMetadata.Kind because it only offers 3 types: KEY, CUSTOM and COMPOSITES, which does not reflect the KEYS, FULL and ENTRIES types of index ...

This issue is critical for frameworks & libraries that use the driver to parse/validate/display C* table metadata

Environment

None

Pull Requests

None

Status

Assignee

Unassigned

Reporter

DOAN DuyHai

Labels

None

PM Priority

None

Reproduced in

2.2.0-rc3
3.0.0alpha5

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

Doc Impact

None

Reviewer

None

Size

None

Components

Affects versions

3.0.0alpha5
2.2.0-rc3

Priority

Major
Configure