Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
9.0.0
Description
Hello world,
When converting from Arrow to Parquet it looks like there is a bug with arrays of type arrow.NULL. Here is a snippet of code to reproduce the bug:
package main import ( "fmt" "log" "os" "github.com/apache/arrow/go/v9/arrow" "github.com/apache/arrow/go/v9/arrow/array" "github.com/apache/arrow/go/v9/arrow/memory" "github.com/apache/arrow/go/v9/parquet/pqarrow" ) const n = 10 func run() error { schema := arrow.NewSchema( []arrow.Field{ {Name: "f1", Type: arrow.Null, Nullable: true}, }, nil, ) rb := array.NewRecordBuilder(memory.DefaultAllocator, schema) defer rb.Release() for i := 0; i < n; i++ { rb.Field(0).(*array.NullBuilder).AppendNull() } rec := rb.NewRecord() defer rec.Release() for i, col := range rec.Columns() { fmt.Printf("column[%d] %q: %v\n", i, rec.ColumnName(i), col) } f, err := os.Create("output.parquet") if err != nil { return err } defer f.Close() w, err := pqarrow.NewFileWriter(rec.Schema(), f, nil, pqarrow.DefaultWriterProps()) if err != nil { return err } defer w.Close() err = w.Write(rec) if err != nil { return err } return nil } func main() { if err := run(); err != nil { log.Fatal(err) } }
Attachments
Issue Links
- links to