Skip to content

Commit

Permalink
infer the given encoding based on the provided encodings (#356)
Browse files Browse the repository at this point in the history
* infer the given encoding based on the provided encodings

* use default behavior if no non-plain/rle present
  • Loading branch information
thorfour authored Oct 3, 2022
1 parent bf420f7 commit 0309c7d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions column.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,13 @@ func (cl *columnLoader) open(file *File, path []string) (*Column, error) {
// the page headers to determine which compression and encodings are
// applied.
for _, encoding := range c.chunks[0].MetaData.Encoding {
c.encoding = LookupEncoding(encoding)
break
if c.encoding == nil {
c.encoding = LookupEncoding(encoding)
}
if encoding != format.Plain && encoding != format.RLE {
c.encoding = LookupEncoding(encoding)
break
}
}
c.compression = LookupCompressionCodec(c.chunks[0].MetaData.Codec)
}
Expand Down

0 comments on commit 0309c7d

Please sign in to comment.