Skip to content

[Feature] Speed up range-based reading of DataSplit data in AI training scenarios #9668

Description

@weijietong

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

For AI training scenarios, it is necessary to read all data from a sample table in either append or DE format for training. The training process reads data sequentially in batches according to the training layer's batch size. If an original Parquet file contains many rows, each batch only reads a specific range of rows within it. Under the current interface, users can only skip unwanted rows one by one, which is a significant waste.

Solution

We can utilize the Parquet footer information to directly filter out unnecessary page data. Therefore, we propose adding a new method to the TableRead interface:
RecordReader<InternalRow> createReader(Split split, RowRange rowRange) throws IOException;

Here, RowRange describes the row range for this split, e.g., [300, 500], allowing Paimon to accelerate the read process based on the underlying data format. If the underlying storage cannot support this optimization (e.g., primary key tables), it should fall back to the original naive implementation that skips rows based on row numbers.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions