-
Notifications
You must be signed in to change notification settings - Fork 3k
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
add a custom http header: Accept-Type-Allow-Int64 #27901
add a custom http header: Accept-Type-Allow-Int64 #27901
Conversation
@PowderLi Please associate the related issue to the body of your Pull Request. (eg. “issue: #”) |
@PowderLi ut workflow job failed, comment |
f25bf1a
to
c8f2fff
Compare
@PowderLi E2e jenkins job failed, comment |
@PowderLi E2e jenkins job failed, comment |
c8f2fff
to
b526853
Compare
@PowderLi E2e jenkins job failed, comment |
/run-cpu-e2e |
Codecov Report
@@ Coverage Diff @@
## master #27901 +/- ##
==========================================
+ Coverage 81.79% 81.81% +0.01%
==========================================
Files 824 820 -4
Lines 116574 117054 +480
==========================================
+ Hits 95353 95764 +411
- Misses 18061 18121 +60
- Partials 3160 3169 +9
|
@@ -218,6 +218,11 @@ func generateSearchResult() []map[string]interface{} { | |||
FieldBookIntro: []float32{0.3, 0.33}, | |||
HTTPReturnDistance: float32(0.09), | |||
} | |||
if dataType == schemapb.DataType_String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cover schemapb.DataType_VarChar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can modify this in next pr
StrId: &schemapb.StringArray{ | ||
Data: []string{"1", "2", "3"}, | ||
} | ||
case schemapb.DataType_String: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cover schemapb.DataType_VarChar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can modify this in next pr
@@ -404,7 +405,7 @@ func (h *Handlers) query(c *gin.Context) { | |||
if err != nil { | |||
c.JSON(http.StatusOK, gin.H{HTTPReturnCode: merr.Code(err), HTTPReturnMessage: err.Error()}) | |||
} else { | |||
outputData, err := buildQueryResp(int64(0), response.OutputFields, response.FieldsData, nil, nil) | |||
outputData, err := buildQueryResp(int64(0), response.OutputFields, response.FieldsData, nil, nil, strings.ToLower(c.Request.Header.Get(HTTPHeaderAllowInt64)) != "false") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about strconv.ParseBool ?
if val == "" { | ||
httpParams := ¶mtable.Get().HTTPCfg | ||
if !httpParams.AcceptTypeAllowInt64.GetAsBool() { | ||
c.Request.Header.Set(httpserver.HTTPHeaderAllowInt64, "false") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not need to set "true" in case of httpParams.AceptTypeAllocInt64 is true ?
d6a2bd0
to
2fc0d34
Compare
2fc0d34
to
3e083ec
Compare
@PowderLi E2e jenkins job failed, comment |
3e083ec
to
4996cc3
Compare
@PowderLi E2e jenkins job failed, comment |
4996cc3
to
4992ff8
Compare
@PowderLi ut workflow job failed, comment |
0d082c7
to
8d5d9a1
Compare
8d5d9a1
to
bfcc17a
Compare
Signed-off-by: PowderLi <[email protected]>
bfcc17a
to
7e7e323
Compare
@PowderLi E2e jenkins job failed, comment |
/run-cpu-e2e |
@PowderLi E2e jenkins job failed, comment |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: czs007, PowderLi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/kind bug
to #27856
to #27988