Prevent nil pointer exception during Distinct key translation

This commit is contained in:
Alan Bernstein 2021-01-29 09:39:01 -06:00
parent 4b33a7fe16
commit 4fba6bea82

View file

@ -6572,6 +6572,9 @@ func (e *executor) translateResult(ctx context.Context, index string, idx *Index
if field.Keys() {
rslt := result.Pos
if rslt == nil {
return &SignedRow{Pos: &Row{}}, nil
}
other := &Row{Attrs: rslt.Attrs}
for _, segment := range rslt.Segments() {
keys, err := e.Cluster.translateIndexIDs(context.Background(), field.ForeignIndex(), segment.Columns())