Skip to content

[Feature] Support InternalRow#createFieldToString #4924

Open

Description

@wuchong

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

Platform integrations need to display Fluss table data as human-readable strings, for example in a data preview or query result table.

Currently, InternalRow.createFieldGetter(DataType, int) returns values in Fluss's internal representation. Calling toString() on those values is not sufficient for all types: DATE and TIME are represented as integers, while binary and nested values require type-aware formatting. Each platform therefore has to implement its own conversion logic.

Solution

Add InternalRow#createFieldToString(DataType fieldType, int fieldPos) to create a reusable converter that reads a field from an InternalRow and renders it as a human-readable string, following the factory pattern of createFieldGetter.

The converter should:

  • Support the Fluss data types used in table schemas, including strings, numbers, decimals, temporal values, binary values, and nested ARRAY/MAP/ROW values.
  • Handle null fields and null values inside nested structures consistently.
  • Format dates and times as readable temporal values instead of their internal integer representation.
  • Define and document binary formatting, temporal precision/time-zone behavior, and null representation so platform integrations can rely on consistent output.
  • Allow converters to be created once from the schema and reused when displaying multiple rows.

Add tests for scalar, temporal, binary, null, and nested values, including consistent results across relevant InternalRow implementations.

Anything else?

Related API: InternalRow.java.

Willingness to contribute

  • I'm willing to submit a PR!

Activity

  1. ss666 commented on Oct 28, 2026

    @ss666

    I'm willing to work on this one.

  2. wuchong commented on Oct 29, 2026

    @wuchong
    MemberAuthor

    @ss666 This issue is assigned to you. Please ensure that timestamp, date, time, and bytes types are converted to human-readable strings. For complex types such as array, map, and row, I recommend outputting them in JSON format to improve readability.

  3. wuchong commented on Oct 29, 2026

    @wuchong
    MemberAuthor

    For the implementation, please refer to org.apache.flink.formats.json.RowDataToJsonConverters.

  4. added this to the v1.1 milestone on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions