-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++ API. When the row I seek to is in the same row-group as the current row, why don't use the skip function directly, but instead seek to the row-group again and then skip? #2084
Comments
Could you provide more context? How did you tell the C++ reader to read only row 100 and 130 out of an ORC file? |
Through the index we built ourselves, we know that a certain query needs to read the data of row 100 and 130, then we will SeekToRow(100) and Next(1), SeekToRow(130) and Next(1). |
An error will occur if a user attempts to read line 129 after reading line 130 without performing SeekToRowGroup again. |
We will ensure that we seek and read in order and will not read back.But I think how it is used externally has nothing to do with the internal implementation of orc. |
like this in SeekToRow function
|
This may be rare in offline batch processing scenarios. |
Thank you for reporting. Could you provide a real sample file to speed up our discussion, @hrbeuyz24 ? |
In addition, IIUC, it's an improvement idea which you want to propose, right? In that case, please make a PR to us. We are software engineers. :) |
We use orc as the storage format for our real-time data warehouse, our online query will have a lot of random reads and frequent seeks. We found that a lot of time is consumed in SeekToRowGroup and Skip.
Many of our target rows in multiple seeks are in the same row group, This leads to the problem in my title.
For example, there is an online query, we need to read the data of row 100 and row 130,
The current behavior is
Why not
We simply modified the code and found that in our scenario it can bring at least 50% read performance benefits.
The text was updated successfully, but these errors were encountered: