Skip to content
This repository was archived by the owner on Jul 25, 2022. It is now read-only.
This repository was archived by the owner on Jul 25, 2022. It is now read-only.

Should PyDataFrame.collect() return a Table? #23

Open

Description

@wjones127

Right now it returns List[pa.RecordBatch], but it might be more natural to return a pa.Table. For one thing, they have a better repr provided by PyArrow.

Activity

  1. matthewmturner commented on Feb 20, 2022

    @matthewmturner
    Contributor

    Asides from repr, do you see any other advantages?

  2. houqp commented on Feb 20, 2022

    @houqp
    Member

    This is to keep the signature in sync with what we have in the Rust core. Perhaps it would be better to add a new method to return a pa.Table instead.

  3. wjones127 commented on Feb 20, 2022

    @wjones127
    Author

    Asides from repr, do you see any other advantages?

    Mostly was just surprised coming from PyArrow, but it sounds like Rust usually just represents results as a sequence of record batches.

    Perhaps it would be better to add a new method to return a pa.Table instead.

    Yeah perhaps that's a better path. A to_table() method is common in PyArrow. If we eventually get the C Streaming data interface implemented in arrow-rs, we could also provide a to_reader().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions