Skip to content

Commit

Permalink
skip columns with only nulls
Browse files Browse the repository at this point in the history
  • Loading branch information
gernest committed Feb 10, 2024
1 parent b86b335 commit 31ce3e4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion staples/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ func (idx *Index) Index(r arrow.Record) (index.Full, error) {
if skip[name] {
continue
}
cIdx.Index(r.Column(i).(*array.Dictionary))
a := r.Column(i)
if a.NullN() == a.Len() {
// skip columns that only nulls. This happens for instance when geo ip is not
// configured or cases of utm* properties
continue
}
cIdx.Index(a.(*array.Dictionary))
n, err := cIdx.Build(name)
if err != nil {
return nil, err
Expand Down

0 comments on commit 31ce3e4

Please sign in to comment.