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

[Rust] Allow json writer to write out JSON arrays as well as newline formatted objects

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0
    • Component/s: Rust

      Description

      Currently the arrow json writer makes JSON that looks like this (one record per line):
      ```

      {"foo":1} {"bar":1}

      ```

      Whereas a JSON array looks like this
      ```
      [

      {"foo":1}

      ,

      {"bar":1}

      ]
      ```
      It would be nice to write out json in a streaming fashion (we added such a feature in IOx via https://github.com/influxdata/influxdb_iox/pull/870/files)

      /// Writes out well formed JSON arays in a streaming fashion
      ///
      /// [

      {"foo": "bar"}

      ,

      {"foo": "baz"}

      ]
      ///
      /// This is based on the arrow JSON writer (json::writer::Writer)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alamb Andrew Lamb
                Reporter:
                alamb Andrew Lamb
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m