minyoung commented on issue #35202:
URL: https://github.com/apache/arrow/issues/35202#issuecomment-1526790176

   Thanks for having a look @zeroshade!
   
   Some of the panics are gone now 🎉 
   Unsure if related or not but we do get a panic with a slightly more 
populated version of our dataset:
   
   ```golang
   func (ps *ParquetIOTestSuite) TestNestedEmptyList() {
        bldr := array.NewStructBuilder(memory.DefaultAllocator, arrow.StructOf(
                arrow.Field{
                        Nullable: true,
                        Name:     "root",
                        Type: arrow.StructOf(
                                arrow.Field{
                                        Nullable: true,
                                        Name:     "child1",
                                        Type: arrow.ListOf(arrow.StructOf(
                                                arrow.Field{
                                                        Nullable: true,
                                                        Name:     "child2",
                                                        Type: 
arrow.ListOf(arrow.StructOf(
                                                                arrow.Field{
                                                                        
Nullable: true,
                                                                        Name:   
  "name",
                                                                        Type:   
  arrow.BinaryTypes.String,
                                                                },
                                                        )),
                                                },
                                        )),
                                },
                        ),
                },
        ))
        defer bldr.Release()
   
        rootBldr := bldr.FieldBuilder(0).(*array.StructBuilder)
        child1Bldr := rootBldr.FieldBuilder(0).(*array.ListBuilder)
        child1ElBldr := child1Bldr.ValueBuilder().(*array.StructBuilder)
        child2Bldr := child1ElBldr.FieldBuilder(0).(*array.ListBuilder)
        leafBldr := child2Bldr.ValueBuilder().(*array.StructBuilder)
        nameBldr := leafBldr.FieldBuilder(0).(*array.StringBuilder)
   
        // target structure 8 times
        // {
        //   "root": {
        //     "child1": [
        //       { "child2": [{ "name": "foo" }] },
        //       { "child2": [] }
        //     ]
        //   }
        // }
   
        for i := 0; i < 8; i++ {
                bldr.Append(true)
                rootBldr.Append(true)
                child1Bldr.Append(true)
   
                child1ElBldr.Append(true)
                child2Bldr.Append(true)
                leafBldr.Append(true)
                nameBldr.Append("foo")
   
                child1ElBldr.Append(true)
                child2Bldr.Append(true)
        }
   
        arr := bldr.NewArray()
        defer arr.Release()
   
        field := arrow.Field{Name: "x", Type: arr.DataType(), Nullable: true}
        expected := array.NewTable(
                arrow.NewSchema([]arrow.Field{field}, nil),
                []arrow.Column{*arrow.NewColumn(field, 
arrow.NewChunked(field.Type, []arrow.Array{arr}))},
                -1,
        )
        defer expected.Release()
   
        ps.roundTripTable(expected, false)
   }
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to