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

[Rust]: Json reader for nested dictionary arrays returns empty array instead of array of nulls

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • None
    • None
    • Rust
    • None

    Description

       

      // schema: id: Utf8, attr: List<Dictionary<Utf8>>
              let input = json!([
                  {"id": "a"},
                  {"id": "b"},
                  {"id": "c"},
                  {"id": "d"},
                  {"id": "e"},
              ]);
      
      // Results in ArrowError("InvalidArgumentError(\"all columns in a record batch must have the same length\")")

      Probably related to `list_array_string_array_builder` around line 688:

      if let Some(value) = row.get(col_name) { 
      ...
      }
      // no else

       

      Expected: The resulting array should have a length equal to the number of rows, all nested lists should be marked as null.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jhorstmann Jörn Horstmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: