Skip to content

[client] Add support of column aliasing for PojoConverter #3439

@VladBanar

Description

@VladBanar

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

Currently, POJO field names must exactly match Fluss table column names. This creates rigid naming constraints that conflict with Java naming conventions (camelCase) and database naming conventions (snake_case).

Solution

Introduce @ColumnName annotation for POJO fields to map them to table columns with different names. The annotation is processed during POJO inspection in PojoType.of(), storing properties keyed by their mapped column names. This enables seamless bidirectional conversion between POJOs (with idiomatic Java naming) and Fluss tables (with any naming convention), with zero runtime overhead and full backward compatibility.

Anything else?

No response

Willingness to contribute

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions