Skip to content

Commit

Permalink
fix: detected fields unwrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorwhitney committed Apr 1, 2024
1 parent 6439dd7 commit 0f84f6b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/querier/queryrange/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,10 @@ func (Codec) QueryRequestUnwrap(ctx context.Context, req *QueryRequest) (queryra
return &DetectedLabelsRequest{
DetectedLabelsRequest: *concrete.DetectedLabels,
}, ctx, nil
case *QueryRequest_DetectedFields:
return &DetectedFieldsRequest{
DetectedFieldsRequest: *concrete.DetectedFields,
}, ctx, nil
default:
return nil, ctx, fmt.Errorf("unsupported request type while unwrapping, got (%T)", req.Request)
}
Expand Down Expand Up @@ -371,6 +375,8 @@ func (Codec) QueryRequestWrap(ctx context.Context, r queryrangebase.Request) (*Q
result.Request = &QueryRequest_ShardsRequest{ShardsRequest: req}
case *DetectedLabelsRequest:
result.Request = &QueryRequest_DetectedLabels{DetectedLabels: &req.DetectedLabelsRequest}
case *DetectedFieldsRequest:
result.Request = &QueryRequest_DetectedFields{DetectedFields: &req.DetectedFieldsRequest}
default:
return nil, fmt.Errorf("unsupported request type while wrapping, got (%T)", r)
}
Expand Down

0 comments on commit 0f84f6b

Please sign in to comment.