Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return error instead of asserting in handleCompareFunction. #3664

Merged
merged 1 commit into from
Jul 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions worker/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -1036,8 +1036,10 @@ func (qs *queryState) handleCompareFunction(ctx context.Context, arg funcArgs) e
attr := arg.q.Attr
span.Annotatef(nil, "Attr: %s. Fname: %s", attr, arg.srcFn.fname)
tokenizer, err := pickTokenizer(attr, arg.srcFn.fname)
// We should already have checked this in getInequalityTokens.
x.Check(err)
if err != nil {
return err
}

// Only if the tokenizer that we used IsLossy, then we need to fetch
// and compare the actual values.
span.Annotatef(nil, "Tokenizer: %s, Lossy: %t", tokenizer.Name(), tokenizer.IsLossy())
Expand Down