Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-9386

[Rust] RecordBatch.schema() should not return &Arc<Schema>

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 1.0.0
    • Component/s: Rust
    • Labels:
      None

      Description

      RecordBatch.schema() should not return &Arc<Schema>. It should either return &Schema or Arc<Schema>.

      Given that the schema could be a large nested structure and other code may want to keep references to it, Arc<Schema> is probably best.

      Returning a reference to an Arc just doesn't make much sense, IMHO, and I think I was responsible for introducing this early on.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                andygrove Andy Grove
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: