Prajwal-banakar opened a new pull request, #2261:
URL: https://github.com/apache/fluss/pull/2261
This commit adds documentation for the new Typed API, which allows users to
work directly with POJOs. It includes examples for writing, reading, and
performing lookups, as well as a note on performance considerations.
<!--
*Thank you very much for contributing to Fluss - we are happy that you want
to help us improve Fluss. To help the community review your contribution in the
best possible way, please go through the checklist below, which will get the
contribution into a shape in which it can be best reviewed.*
## Contribution Checklist
- Make sure that the pull request corresponds to a [GitHub
issue](https://github.com/apache/fluss/issues). Exceptions are made for typos
in JavaDoc or documentation files, which need no issue.
- Name the pull request in the format "[component] Title of the pull
request", where *[component]* should be replaced by the name of the component
being changed. Typically, this corresponds to the component label assigned to
the issue (e.g., [kv], [log], [client], [flink]). Skip *[component]* if you are
unsure about which is the best component.
- Fill out the template below to describe the changes contributed by the
pull request. That will give reviewers the context they need to do the review.
- Make sure that the change passes the automated tests, i.e., `mvn clean
verify` passes.
- Each pull request should address only one issue, not mix up code from
multiple issues.
**(The sections below can be removed for hotfixes or typos)**
-->
### Purpose
Linked issue: close #2230
The purpose of this change is to provide comprehensive documentation for the
Typed API introduced in #1992. This API simplifies the developer experience by
allowing users to interact with Fluss using POJOs (Plain Old Java Objects)
rather than manually handling row and column indices, ensuring better type
safety and code readability.
<!-- Linking this pull request to the issue -->
<!-- What is the purpose of the change -->
### Brief change log
<!-- Please describe the changes made in this pull request and explain how
they address the issue -->
• New Documentation Page: Added website/docs/apis/java-typed-api.md covering
the Typed API usage.
• Usage Examples: Included code snippets for:
◦ Defining POJOs with supported data types.
◦ Writing data using TypedAppendWriter and TypedUpsertWriter (including
partial updates).
◦ Reading and scanning data using TypedLogScanner.
◦ Performing point lookups via TypedLookuper.
• Performance Notes: Added a section on the overhead of
reflection/conversion vs. manual row handling and best practices for
high-throughput scenarios.
• Updated Existing Docs: Updated website/docs/apis/java-client.md to link to
the new Typed API page.
### Tests
<!-- List UT and IT cases to verify this change -->
Documentation Build: Verified that the documentation renders correctly using
the local Docusaurus build process.
Code Snippets: All Java code examples included in the documentation were
cross-referenced with existing integration tests in fluss-client to ensure
accuracy.
BEFORE
<img width="1920" height="1080" alt="Screenshot 2025-12-25 225948"
src="https://github.com/user-attachments/assets/decbb538-a17a-4512-931b-92e1528d9174"
/>
AFTER
<img width="1920" height="1080" alt="Screenshot 2025-12-25 225929"
src="https://github.com/user-attachments/assets/d3c9ce7e-1d62-440f-a4f7-df1a7c30a0ec"
/>
### API and Format
<!-- Does this change affect API or storage format -->
This PR is documentation only and does not change the existing API or
storage format. It describes the public TypedAppendWriter, TypedUpsertWriter,
TypedLogScanner, and TypedLookuper interfaces.
### Documentation
<!-- Does this change introduce a new feature -->
Does this change introduce a new feature? No, it documents a feature
previously added.
Is the documentation updated? Yes, this PR is specifically for documentation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]