sdf-jkl commented on PR #9118:
URL: https://github.com/apache/arrow-rs/pull/9118#issuecomment-3792650419

   It seems like the issue was caused by different sized pages after all. 
Bigger types would have more smaller "finer" pages and smaller types would have 
less bigger "coarser" pages.
   
   If the column with coarse pages was used to enable page awareness we would 
use it's page offsets.
   
   ```
                                ┏━━━━┓ ┌────────┐            ┌────────┐
   - '1' means selected         ┃ 1  ┃ │ Row 0  │            │ Row 0  │
   - '0' means filtered         ┃ 1  ┃ │ Row 1  │            │ Row 1  │
                                ┃ 0  ┃ │ Row 2  │  A Page 0  └────────┘
                                ┃ 0  ┃ │ Row 3  │            ┌────────┐
                                ┃ 0  ┃ │ Row 4  │            │ Row 2  │
                                ┃    ┃ └────────┘            │ Row 3  │  B Page 
1 (skipped)
                                ┃    ┃ ┌────────┐            └────────┘
                                ┃ 0  ┃ │ Row 5  │            ┌────────┐
                                ┃ 0  ┃ │ Row 6  │  A Page 1  │ Row 4  │
                                ┃ 0  ┃ │ Row 7  │            │ Row 5  │  B Page 
2 (skipped)
                                ┃ 1  ┃ │ Row 8  │            └────────┘
                                ┃ 1  ┃ │ Row 9  │            ┌────────┐
                                ┗━━━━┛ └────────┘            │ Row 6  │
                                                             │ Row 7  │  B Page 
3 (skipped)
                                                             └────────┘
                                                             ┌────────┐
                                                             │ Row 8  │
                                                             │ Row 9  │  B Page 
4 (fetched)
                                                             └────────┘
   
   Mask chunking uses A's coarse boundary:
   - Chunk 1 tries to read rows 0–4 (A Page 0)
   
   But Column B has fine pages:
   - rows 2–5 are in B Pages 1–2 (skipped)
   
   → The chunk crosses into unfetched B pages → invalid offset
   
   ```
   
   In the example above col A with "coarse" pages overlaps with "finer" pages 
in Col B that were skipped during data fetch. This lead to the invalid offsets 
issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to