Skip to content

Introduce RowDeserializationSchema #690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 2 tasks
wuchong opened this issue Mar 30, 2025 · 2 comments
Open
1 of 2 tasks

Introduce RowDeserializationSchema #690

wuchong opened this issue Mar 30, 2025 · 2 comments

Comments

@wuchong
Copy link
Member

wuchong commented Mar 30, 2025

Search before asking

  • I searched in the issues and found nothing similar.

Description

We have already introduced RowDataDeserializationSchema in #661, which converts Fluss LogRecord into a Flink RowData. However, that's mainly used as an internal API for SQL Connector. For DataStream API, it would be more convenient to have a RowDeserializationSchema which converts into Flink Row. The Flink Row provides both position-based access and name-based access, similar to Avro GenericRecord. In this way, users can easily add map transformation on the DataStream to convert the Row into user-defined POJOs. Such as:

        // the map transformation converts Flink Row into user-defined POJO.
        Long orderId = (Long) row.getField("orderId");
        Long itemId = (Long) row.getField("itemId");
        Integer amount = (Integer) row.getField("amount");
        String address = (String) row.getField("address");
        return new Order(orderId, itemId, amount, address);

See the discussion in #661 (comment)

Willingness to contribute

  • I'm willing to submit a PR!
@MehulBatra
Copy link
Contributor

@wuchong I would like to do it!

@polyzos
Copy link
Collaborator

polyzos commented Mar 31, 2025

@MehulBatra, I already have a working implementation of this from my original design because it is doing such conversions.
Although I need to extend the support to complex types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants