xitongsys/parquet-go

JSON Schema parsing fails

Opened this issue · 0 comments

Taking the example local flat modify line 69

	- pr, err := reader.NewParquetReader(fr, new(Student), 4)

Replace with

    a := `{
  "Tag": "name=Parquet_go_root, repetitiontype=REQUIRED",
  "Fields": [
    {
      "Tag": "name=Name, type=BYTE_ARRAY, convertedtype=UTF8, repetitiontype=REQUIRED"
    },
    {
      "Tag": "name=Age, type=INT32, repetitiontype=REQUIRED"
    },
    {
      "Tag": "name=Id, type=INT64, repetitiontype=REQUIRED"
    },
    {
      "Tag": "name=Weight, type=FLOAT, repetitiontype=REQUIRED"
    },
    {
      "Tag": "name=Sex, type=BOOLEAN, repetitiontype=REQUIRED"
    },
    {
      "Tag": "name=Day, type=INT32, convertedtype=DATE, repetitiontype=REQUIRED"
    }
  ]
}`

pr, err := reader.NewParquetReader(fr, a, 4)

Causes error

Can't create parquet reader [NextRowGroup] Column not found: Parquet_go_rootName

It reads from the file fine if you do not use a json document