Skip to content

Commit

Permalink
fix dict read bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xitongsys authored and durango committed Apr 14, 2021
1 parent 521bf34 commit e2758ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion layout/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -776,10 +776,15 @@ func ReadPage(thriftReader *thrift.TBufferedTransport, schemaHandler *schema.Sch
page.Header = pageHeader
table := new(Table)
table.Path = path
bitWidth, idx := 0, schemaHandler.MapIndex[name]
if colMetaData.GetType() == parquet.Type_FIXED_LEN_BYTE_ARRAY {
bitWidth = int(schemaHandler.SchemaElements[idx].GetTypeLength())
}

table.Values, err = encoding.ReadPlain(bytesReader,
colMetaData.GetType(),
uint64(pageHeader.DictionaryPageHeader.GetNumValues()),
0)
uint64(bitWidth))
if err != nil {
return nil, 0, 0, err
}
Expand Down

0 comments on commit e2758ab

Please sign in to comment.