friendlymatthew commented on issue #19839: URL: https://github.com/apache/datafusion/issues/19839#issuecomment-3769807336
> You’re absolutely right—setting the policy to `Optional` is the right first step to prevent the initial "hard crash" on files without metadata, but it doesn't solve the downstream logic dependencies. If we keep the row selection policy as `Auto`, and the page index fails to load (because it's missing), `Auto` needs to be smart enough to fallback. If it still tries to use `Masks` (which relies on `PageIndex` for sparse offset resolution), we’ll likely hit the same "Invalid offset" error during the actual scan. I think we should: > > 1. Set `PageIndexPolicy::Optional` as proposed. > 2. Add a check to verify if the page index is actually present in the metadata. > 3. If missing, we should explicitly force the row selection strategy to `Selectors` (dense) rather than letting it attempt `Masks`. This ensures that even without the index, the reader correctly falls back to a continuous scan of the row group instead of trying to "jump" to offsets it can't verify. Looking forward to this! Would be great to add some extensive test coverage as well -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
