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

[Go] firstTimeBitmapWriter.Finish() panics with list of 8 structs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: In Progress
    • Critical
    • Resolution: Unresolved
    • 10.0.1
    • None
    • Go, Parquet

    Description

      Even after ARROW-17169 I still get a panic at the same location.

      Below is a test case that panics:

      func (ps *ParquetIOTestSuite) TestStructWithListOf8Structs() {
      	bldr := array.NewStructBuilder(memory.DefaultAllocator, arrow.StructOf(
      		arrow.Field{
      			Name: "l",
      			Type: arrow.ListOf(arrow.StructOf(
      				arrow.Field{Name: "a", Type: arrow.BinaryTypes.String},
      			)),
      		},
      	))
      	defer bldr.Release()
      
      	lBldr := bldr.FieldBuilder(0).(*array.ListBuilder)
      	stBldr := lBldr.ValueBuilder().(*array.StructBuilder)
      	aBldr := stBldr.FieldBuilder(0).(*array.StringBuilder)
      
      	bldr.AppendNull()
      	bldr.Append(true)
      	lBldr.Append(true)
      	for i := 0; i < 8; i++ {
      		stBldr.Append(true)
      		aBldr.Append(strconv.Itoa(i))
      	}
      
      	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)
      }
      

      I've tried to trim down the input data and this is as minimal as I could get it. And yes:

      • wrapping struct with initial null is required
      • the inner list needs to contain 8 structs (or any multiple of 8)

      Attachments

        Issue Links

          Activity

            People

              minyoung Min-Young Wu
              minyoung Min-Young Wu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h