Skip to content

Conversation

@loserwang1024
Copy link
Contributor

@loserwang1024 loserwang1024 commented Jan 16, 2026

Purpose

Linked issue: close #2311

Brief change log

Tests

org.apache.fluss.server.tablet.TabletServiceITCase#testFetchLogWithNestedRowProjectionPushdown

API and Format

Documentation

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for projection pushdown with field IDs in the server, enabling more flexible column selection that works better with schema evolution. Instead of only supporting projection by field position, the server can now project fields by their IDs, which remain stable across schema changes.

Changes:

  • Added project_by_ids optional boolean field to protobuf message PbFetchLogReqForTable to indicate whether projection uses field IDs or positions
  • Updated FileLogProjection to support both field ID and field position based projection with new flattening logic for nested rows
  • Extended FetchReqInfo, FetchParams, and related classes to propagate the isProjectByIds flag through the fetch pipeline

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
fluss-rpc/src/main/proto/FlussApi.proto Added optional project_by_ids field to fetch log request
fluss-common/src/main/java/org/apache/fluss/record/FileLogProjection.java Implemented field ID-based projection logic with new methods for flattening and projecting by IDs
fluss-common/src/main/java/org/apache/fluss/record/ProjectionPushdownCache.java Updated cache key to include isSelectedByIds flag
fluss-server/src/main/java/org/apache/fluss/server/entity/FetchReqInfo.java Added isProjectByIds field and made maxBytes final
fluss-server/src/main/java/org/apache/fluss/server/log/FetchParams.java Added isSelectedByIds parameter to setCurrentFetch method
fluss-server/src/main/java/org/apache/fluss/server/utils/ServerRpcMessageUtils.java Parsed project_by_ids from protobuf message and passed to FetchReqInfo
fluss-server/src/main/java/org/apache/fluss/server/replica/ReplicaManager.java Removed unused field declaration (but this is a bug - field is still used)
fluss-server/src/main/java/org/apache/fluss/server/coordinator/SchemaUpdate.java Removed unnecessary cast from highestFieldId parameter
fluss-common/src/test/java/org/apache/fluss/testutils/DataTestUtils.java Added recursive assertion support for nested row types
fluss-common/src/test/java/org/apache/fluss/record/FileLogProjectionTest.java Added comprehensive tests for projection by field IDs including nested rows
fluss-server/src/test/java/org/apache/fluss/server/tablet/TabletServiceITCase.java Added integration tests for nested row projection with both projection modes
fluss-server/src/test/java/org/apache/fluss/server/testutils/RpcMessageTestUtils.java Updated test utility methods to support isProjectByIds parameter
Multiple test files Updated all test calls to include the new isProjectByIds parameter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@loserwang1024 loserwang1024 force-pushed the nested-row-projection-pushdown branch from 157d968 to db6d093 Compare January 19, 2026 09:21
@loserwang1024
Copy link
Contributor Author

@wuchong @libenchao @leonardBang , CC

@loserwang1024 loserwang1024 changed the title [server] Support projection pushdown with field id in server. [server] Support projection pushdown with field id in server side. Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implements projection pushdown for nested row.

1 participant