v.25.5New Feature

Support _part_starting_offset virtual column

Support _part_starting_offset virtual column in MergeTree-family tables. This column represents the cumulative row count of all preceding parts, calculated at query time based on the current part list. The cumulative values are retained throughout query execution and remain effective even after part pruning. Related internal logic has been refactored to support this behavior. #79417 (Amos Bird).
Added support for the _part_starting_offset virtual column in MergeTree-family tables, which provides the cumulative row count of all preceding parts at query time.

Why it matters

This feature enables users to obtain the cumulative number of rows before the current part in MergeTree tables during query execution. It helps in scenarios where relative positioning across parts is needed, and ensures that cumulative values persist even after part pruning, improving query consistency and internal logic.

How to use it

Users can simply include the _part_starting_offset virtual column in their SELECT queries on MergeTree-family tables to retrieve the cumulative row count of preceding parts. This column is computed automatically at query time without additional configuration.