v.25.5New Feature
Support _part_starting_offset virtual column
Support_part_starting_offsetvirtual column inMergeTree-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).
Why it matters
This feature enables users to obtain the cumulative number of rows before the current part inMergeTree 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.