You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "peterxcli (via GitHub)" <gi...@apache.org> on 2026/09/15 20:26:24 UTC

[PR] feat: Support lazy per-file Parquet Arrow schema derivation [datafusion]

peterxcli opened a new pull request, #25343:
URL: https://github.com/apache/datafusion/pull/25343

   ## Which issue does this PR close?
   
   Closes #25251.
   
   ## Rationale for this change
   
   Readers such as Comet need each file's physical Parquet schema to choose Arrow types for nested fields, but that schema is only available after loading the footer.
   
   ## What changes are included in this PR?
   
   Add an optional `ParquetFileSchemaProvider` to `ParquetSource`, invoked after footer loading and before Arrow schema inference. It supplies a complete file schema through Arrow's existing `with_schema` API while retaining the original metadata. Explicit `PartitionedFile.arrow_schema` takes precedence.
   
   ## What is the testing strategy for this PR?
   
   Regression tests cover differing nested layouts, ENUM/BINARY handling, cached and encrypted scans, schema precedence and validation, and serialization. Extended workspace tests and lint checks pass.
   
   ## Are there any user-facing changes?
   
   Adds `ParquetSource::with_schema_provider`. Sources using a provider require a custom codec for plan serialization. Default scans are unchanged.
   


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support lazy per-file Parquet Arrow schema derivation [datafusion]

Posted by "peterxcli (via GitHub)" <gi...@apache.org>.
peterxcli commented on PR #25343:
URL: https://github.com/apache/datafusion/pull/25343#issuecomment-5701342334

   @sunchao thanks!


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support lazy per-file Parquet Arrow schema derivation [datafusion]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #25343:
URL: https://github.com/apache/datafusion/pull/25343#issuecomment-5687965607

   ## [Codecov](https://app.codecov.io/gh/apache/datafusion/pull/25343?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `99.10180%` with `3 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 81.93%. Comparing base ([`22651d2`](https://app.codecov.io/gh/apache/datafusion/commit/22651d24cc8196f3206e09a36a437eda9e766b87?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`a14db51`](https://app.codecov.io/gh/apache/datafusion/commit/a14db517e395662cf18e574b655bd26cea9beb29?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/datafusion/pull/25343?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [datafusion/datasource-parquet/src/opener/mod.rs](https://app.codecov.io/gh/apache/datafusion/pull/25343?src=pr&el=tree&filepath=datafusion%2Fdatasource-parquet%2Fsrc%2Fopener%2Fmod.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZGF0YWZ1c2lvbi9kYXRhc291cmNlLXBhcnF1ZXQvc3JjL29wZW5lci9tb2QucnM=) | 99.06% | [1 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/datafusion/pull/25343?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##             main   #25343      +/-   ##
   ==========================================
   + Coverage   81.92%   81.93%   +0.01%     
   ==========================================
     Files        1135     1135              
     Lines      427772   428102     +330     
     Branches   427772   428102     +330     
   ==========================================
   + Hits       350456   350781     +325     
   + Misses      56373    56372       -1     
   - Partials    20943    20949       +6     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/datafusion/pull/25343?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support lazy per-file Parquet Arrow schema derivation [datafusion]

Posted by "sunchao (via GitHub)" <gi...@apache.org>.
sunchao merged PR #25343:
URL: https://github.com/apache/datafusion/pull/25343


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org