You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "QuakeWang (via GitHub)" <gi...@apache.org> on 2026/06/04 07:46:15 UTC

[PR] [python][ray] Preserve schema for empty reads [paimon]

QuakeWang opened a new pull request, #8118:
URL: https://github.com/apache/paimon/pull/8118

   ### Purpose
   
   The top-level Ray `read_paimon` API planned reads through `RayDatasource`. When a table scan produced no splits, `RayDatasource.get_read_tasks()` returned no read tasks, so Ray could create an empty dataset without the Paimon table schema.
   
   This was inconsistent with `TableRead.to_ray()`, which already returns an empty Arrow-backed Ray dataset with the planned read schema.
   
   This PR makes `read_paimon` use the planned `read_type` to build an empty Arrow table when there are no splits, so empty reads preserve schema and projection. It also lazily imports `ray.data` and reports an actionable `pypaimon[ray]` install hint when Ray is missing.
   
   ### Tests
   
   - `python -m pytest paimon-python/pypaimon/tests/ray_integration_test.py::RayIntegrationTest -q`


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [python][ray] Preserve schema for empty reads [paimon]

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


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [python][ray] Preserve schema for empty reads [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #8118:
URL: https://github.com/apache/paimon/pull/8118#issuecomment-4620439690

   +1


-- 
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: issues-unsubscribe@paimon.apache.org

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